Please note, new blog at http://www.acheron.org/darryl/

CFMX 7 & XML Forms @ Brisbane CFUG

Last night Tim Buntel gave the Brisbane CF User Group an informal presentation on Coldfusion MX 7. One of the features that impressed me the most was XML forms.

As I understand it, the new XML format takes advantage of the XFORMS specification to create XML that is then translated directly into HTML. You do this by using a "type" attribute of "XML".

<cfform type="XML"> <cfinput type="text" name="fname" /> <cfinput type="submit" /> </cfform>

You can create your own XSLT (stylesheets) to transform the generated XML into what ever you like, using the "skin" attribute.

<cfform type="XML" skin="myXSLT"> <cfinput type="text" name="fname" /> <cfinput type="submit" /> </cfform>

For example, Tim showed us a CFFORM with a bunch hierarchical CFTREE tags within it. The stylesheet he used did not create a form, but a DHTML menu! You can essentially create whatever you want using custom stylesheets -- tabbed DHTML forms, multi-step wizards, etc.

<cfform type="XML" skin="menu"> <cftree name="menu1" /> <cftreeitem value="foo" display="Menu Item 1"/> <cftreeitem value="foo2" display="Menu Item 2"/> ... </cftree> </cfform>

I look forward to playing with this new functionality... How about you guys?

More: About XML skinnable forms (macromedia.com)