Glad to see there is still somebody *on* this list ;)
Checkboxes and Radio buttons are the one weird html control that will not pass a form value at all if not checked, to the action page. You can get around this by including a <cfparam name="JobTimeFrame" value=""> for each of the controls at the very top of your action page. This is normally done for you if your form is built in the IDE, otherwise you have to remember to do it yourself.
Hope this helps,
Jeff
On 2/20/06, Mark Fuqua <[EMAIL PROTECTED]> wrote:
Hey there,
I'm sorry to be, yet again, the one to break the list silence, but I am
curious if it is a no no to submit a DisplayRadioGroup or multipleCheckBoxes
without a value selected. The docs seem to suggest it is allowed if the
attribute "required=no".
Well, on this form and on the validation on the action page, the "required"
attribute is set to no, however, if I do not pass a value with these two
tags, I get an error that says "Element ANTICIPATEDTRADES is undefined in
FORM." (or JOBTIMEFRAME as the case may be).
I have looked and looked, I can't see what I have done wrong. If I select a
value, it works. Here are the two tags from the form page:
<cf_DisplayRadioGroup column="JobTimeFrame" label="Job Time Frame"
separator=" " required="no" type="TEXT">
<cf_DisplayOption value="ASAP" displayText="ASAP">
<cf_DisplayOption value="1-3 months" displayText="1-3 months">
<cf_DisplayOption value="3-6 months" displayText="3-6 months">
<cf_DisplayOption value="over 6 months" displayText="over 6 months">
</cf_DisplayRadioGroup>
<cf_DisplayMultipleCheckboxes column="AnticipatedTrades" label="Anticipated
trades" required="no" type="text">
<cf_DisplayOption value="Carpentry" displayText="Carpentry">
<cf_DisplayOption value="Drywall" displayText="Drywall">
<cf_DisplayOption value="Painting" displayText="Painting">
<cf_DisplayOption value="Rough Carpentry (framing)" displayText="Rough
Carpentry (framing)">
<cf_DisplayOption value="Plumbing" displayText="Plumbing">
<cf_DisplayOption value="Electrical" displayText="Electrical">
<cf_DisplayOption value="Flooring" displayText="Flooring">
<cf_DisplayOption value="Heating/Air conditioning"
displayText="Heating/Air conditioning">
<cf_DisplayOption value="Landscaping" displayText="Landscaping">
<cf_DisplayOption value="Masonry" displayText="Masonry">
<cf_DisplayOption value="Exterior Decks/Porches" displayText="Exterior
Decks/Porches">
</cf_DisplayMultipleCheckboxes>
Here is the validation at the top of the action page:
<cf_ValidateInput variableName="Form.JobTimeFrame" label="Job Time Frame"
validationType="text" required="no">
<cf_ValidateInput variableName="Form.AnticipatedTrades" label="Anticipated
Trades" validationType="text" required="no">
And Here are the passColumnToAction tags:
<cf_PassColumnToAction column="JobTimeFrame" type="text"
value="#Form.JobTimeFrame#" valueIfEmpty="NULL">
<cf_PassColumnToAction column="AnticipatedTrades" type="text"
value="#Form.AnticipatedTrades#" valueIfEmpty="NULL">
It will not work if I do not select a value for both form fields. Can
anyone tell what I am doing wrong?
Thanks,
Mark Fuqua
**********************************************************************
You can subscribe to and unsubscribe from lists, and you can change
your subscriptions between normal and digest modes here:
http://www.productivityenhancement.com/support/DiscussionListsForm.cfm
**********************************************************************
--
v/r,
Jeff Fleitz
