Phillip,

If you don't like CFFORM, take a look at qForms:
http://www.pengoworks.com/qforms/

Here's an example of what you're trying to do done in qForms:
http://www.pengoworks.com/qforms/docs/examples/n-related_selectboxes.htm

The validation portion is actually all done w/the following code:
// initialize the qForm object
objForm = new qForm("frmExample");

// make these fields required
objForm.required("Sport,Division,Team");

The rest of the JS shows off how you can do n-Related selects.

-Dan

>-----Original Message-----
>From: Phillip Molaro [mailto:[EMAIL PROTECTED]
>Sent: Thursday, July 14, 2005 2:56 PM
>To: CF-Talk
>Subject: CFSELECT (I hate CFFORM)
>
>You can do server side validation and it will catch the errors, BUT it does
>NOT pop up a javascript box like the inline required="yes" feature does.
>What it does is loads a blank page with a plain gray box and it has your
>message.
>
>What you have to do is to put in your select field, then add two hidden
>fields.  The name of each MUST match the name of your select box field.
>Then, to that name you append, "_" and the command you want.  For this
>issue, your first field has "_required" added to the name, and for the
>second hidden field, you add "_cfformnoblanks".  The noBlanks catches the
>first value, which is blank.
>
>Note that in my code below, I have an error message in each hidden field
>(as the documentation states).  Both messages get displayed in the ugly
>gray box.
>
>Here is the code:
>
><cfselect id="survey1" name="survey1" required="yes" message="Please select
>a response for question one." validate="noblanks">
>     <option value="">Select...</option>
>     <option value="Strongly Disagree">1= Strongly Disagree</option>
>     <option value="Disagree">2= Disagree</option>
>     <option value="Neutral">3= Neutral</option>
>     <option value="Agree">4= Agree</option>
>     <option value="Strongly Agree">5= Strongly Agree</option>
></cfselect>
>
><input type="hidden" name="survey1_required" value="You must answer.">
><input type="hidden" name="survey1_cfformnoblanks" value="Please select a
>response for question one.">
>
>I found all this stuff in the LiveDocs here:
>http://livedocs.macromedia.com/coldfusion/7/htmldocs/wwhelp/wwhimpl/common/
>html/wwhelp.htm?context=ColdFusion_Documentation&file=00000161.htm
>
>PS - I tried to be a hack and entered in  ' validate="noblanks" ' into my
>cfselect tag hoping that would do the same thing, just tricking CF into
>writing the JS to have the pop up box.  Sadly, this does not work.
>
>You can also use IsValid or CFPARAM as outlined on this page to make a
>custom solution:
>http://livedocs.macromedia.com/coldfusion/7/htmldocs/wwhelp/wwhimpl/common/
>html/wwhelp.htm?context=ColdFusion_Documentation&file=00000161.htm
>
>

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Find out how CFTicket can increase your company's customer support 
efficiency by 100%
http://www.houseoffusion.com/banners/view.cfm?bannerid=49

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:211901
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to