» Fig Leaf Software Home

We've Got You Covered.

Thursday, October 11, 2012

ColdFusion 9, cflayout and cfform

I ran into an interesting situation today with ColdFusion 9 and cflayout.

It is a common practice to have a single cfform tag wrapped around a cflayout and cflayoutareas so that you can create a single form with multiple pages on multiple tabs. It is also a common practice to create new tabs on the fly using ColdFusion.Layout.createTab.

However, if you create a new tab that contains form fields (like cfinput), you will get an error saying that cfinput tags must be contained in cfform tags, even if you are already using cfajaximport.

The solution, strangely enough, is to simply wrap the cfinput tags in the new tab with a cfform tag. The form fields on the new tab will be included with the form submission when the form wrapping the cflayout is submitted. I have only tested this with a cfform that had no name or action, I don't know if it would work otherwise.

No comments:

Post a Comment

About Us

Fig Leaf Software is an award-winning team of imaginative designers, innovative developers, experienced instructors, and insightful strategists.

For over 20 years, we’ve helped a diverse range of clients...

Read More

Contact Us


Fig Leaf Software

1400 16th Street NW
Suite 450
Washington, DC 20036