So I noticed something odd today. I have a selectbox in a Flash Form that has a top level option doing this:
<option value="" <cfif form.donationForm is "">selected</cfif>>All</option>
However, when I submit the form, the value is "", not an empty string. Here is a more full featured example that shows it:
<cfdump var="#form#">
<cfform format="flash">
<cfselect name="foo">
<option value="">Blank</option>
<option value="1">One</option>
</cfselect>
<cfinput type="submit" name="f1" value="submit">
</cfform>
<cfform format="flash">
<cfselect name="foo">
<option value="">Blank</option>
<option value="1">One</option>
</cfselect>
<cfinput type="submit" name="f1" value="submit">
</cfform>
If you change the format to HTML, it works as expected.


Comment 1 written by Brett Liotta on 26 February 2005, at 10:03 PM
Comment 2 written by Nathan Dintenfass on 27 February 2005, at 2:02 PM
Comment 3 written by barry.b on 27 February 2005, at 4:56 PM
hang, on. that's not an empty string: that's data (a space) in it! not empty in my book...
the point is that the implimentation of cfform should be consistant to html forms.
yeah, I'd consider it a bug too!
my 2c
barry.b
Comment 4 written by Raymond Camden on 27 February 2005, at 5:58 PM
Comment 5 written by Tony Bianco on 28 July 2005, at 10:40 PM
Any answers on this one? How do you grab the value.
- Tony
Comment 6 written by Raymond Camden on 28 July 2005, at 10:46 PM
[Add Comment] [Subscribe to Comments]