Here is part of my form that asks for a user's gender. If I leave it blank when testing it, <cfinput type="radio" name="USER_GENDER" value="male"/> Male <cfinput type="radio" name="USER_GENDER" value="female"/> Female Code (markup): The only way I was able to workaround this, was to place a third option that I marked as checked: <cfinput type="radio" name="USER_GENDER" value="male"/> Male <cfinput type="radio" name="USER_GENDER" value="female"/> Female <cfinput type="radio" name="USER_GENDER" value="It's a secret!" checked="yes"/> It's a secret! Code (markup): How else can I allow a user to leave this field blank? I tried using cfset USER_GENDER="" before the input fields, but this didn't correct the issue.
I guess, when you submit the form, without checking any radio button.. it would complain that #FORM.USER_GENDER# is not defined ______ If that is the problem, add this to where you are reading that field in the second cfm page: <cfset userGender =""> <cfif isDefined("FORM.USER_GENDER")> <cfset userGender = FORM.USER_GENDER> </cfif> Code (markup):
Typically this is what the <cfparam/> tag is for: <cfparam name="form.user_gender" default="" /> Code (markup): If no value is passed form.user_gender will be blank. Otherwise it will be overwritten.