This content has been marked as final. Show 4 replies
the include would work if you used a <select> over a <cfselect>. is there any compelling reason to use <cfselect> in this case?
I want to be able to take full advantage of CFSELECT, CFINPUT, CFCALENDAR, etc. CFSELECT was just used as an example. It'd be nice if I can setup different CFINPUTS and just reuse them in different cfforms. But CF doesn't allow CFINPUT anywhere outside of a CFFORM. So, for example, I can't put CFINPUT inside a CFFUNCTION, and call that function 10 times within a CFFORM. So standardization and code reuse is not an option.
The same problem goes with CFFORM itself. It does not seem to be extendable. For example, I cannot find a way create a custom tag called MyCFFORM that would embed a CFFORM in it. CF wont' let you put a CFINPUT between MyCFFROM tags.
So my question is, is there a way to maybe go under the hood, and extend CFFORM, CFINPUT, CFSELECT, etc? Hope it makes sense.
personally, i don't use cfform. comes from way back in the day when the cfform generated JS would stomp the JS that I wrote myself. i hear it's gotten better... but old habits and all that.
as far as taking full advantage of <cfform> and its child elements... you might want to look into some of the JS libraries like jQuery. I believe that it'll offer the same type of functionality that you're getting from cfform (and then some). not to mention that it's easy to extend yourself, as the library files are just .js
this way you won't be bound by the inability to create modular pieces by the fact that ColdFusion won't allow the cfform elements to be broken up.
just a suggestion. i'm sure there will be others :)
I agree, and I haven't been using CFFORM for the same reasons. I just need to use its Flash and XML capabilities. CFMX 8 is introducing more exotic form elements that are hard to pass on, but CFFORM doens't work with my current framework.