Discussion:
hidden field
(too old to reply)
rockhiker
2009-03-19 21:13:51 UTC
Permalink
I have a class list table that has a classID. I want the classID hidden on the
form but want it to populate the registration table when someone registers. so
far - no go! pls see code. thank you - jim


<label for="class">SESSION:</label>
<cfselect name="class" id="class" title="class">
<option selected="selected">Select a session</option>
<cfoutput query="signup">
<option value="#class#" >#class#</option></cfoutput>

<cfinput type="hidden" name="classID" value="#classID#">
</cfselect>
Azadi
2009-03-20 01:21:31 UTC
Permalink
you can't have a hidden text field (or, really, any other element except
<option> and <optgroup>) INSIDE a select element.

Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com/
Azadi
2009-03-20 01:32:28 UTC
Permalink
<label for="class">SESSION:</label>
<cfselect name="class" id="class" title="class">
<option selected="selected">Select a session</option>
<cfoutput query="signup">
<option value="#CLASSID#">#class#</option>
</cfoutput>
</cfselect>

you will see the values of #CLASS# column in the select list, but the
value submitted with the form will be the corresponding #CLASSID# value


Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com/

Loading...