Creating form element from within a component
I am trying to create a form element within a component function which is then
called from a .cfm page which has the cfform tags. I keep getting a context
validation error for the form element tag. Here is some sample code:
<cffunction name="createTag" returntype="string" access="public">
<option value="0">Value 1</option>
And in the .cfm page:
<cfinvoke component="yourComponent" method="createTag"
The error occurs in the function and it says the cfselect must be within a
cfform. I tried the function without the save content and just set the
output="yes" but the same error occurs.
Any help appreciated in how to get around this. Just putting the code in the
.cfm is not an option for this.
Any help appreciated.