You should probably also add a CHECKED to one of the options, as a default.  It 
can be unselected, but it gives you a better chance of getting real user input.

Mik


At 01:16 PM 11/4/2009, Andy Matthews wrote:

>With radio buttons, checkboxes, and multiple select dropdowns it doesn't
>matter if the form is there on the view page. If no one selects one of the
>options in those input fields, the key doesn't exist in the form.
>
>Use cfparam, or StructKeyExists(FORM,'key') to make sure it's there before
>using it.
>
>
>andy 
>
>-----Original Message-----
>From: Timothy Laureska [mailto:[email protected]] 
>Sent: Wednesday, November 04, 2009 12:00 PM
>To: cf-talk
>Subject: Form Insanity
>
>
>Hello:
> 
>Can somebody tell me why this from select box form and processing template
>produce the message that  "Element UNIT_ID_OTHER" is undefined in form"
> 
><form>
><select name="unit_id_other" multiple="yes"> <option value="">Select Unit
>(if applicable) <option value="">----------------------------------
><cfoutput query="list_units">
><option value="#unit_id#">#unit_name#
></cfoutput>
></select>
></form>
> 
>processing template
> 
><cfif #form.unit_id_other# IS NOT "">
><cfquery datasource="#datasource#" name="find_other_unit"> SELECT * FROM
>dhmh_units where unit_id IN (#form.unit_id_other#) </cfquery> </cfif> 
>
>
>
>
>

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:328030
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to