Perhaps a good idea is to guarantee the selection of a radio button...  Set
a default value for each Radio Button set.  Perhaps putting CHECKED in the
value="0" radio button would aleviate this.

Remember, once a user clicks a radio button, it's pretty much impossible for
them to null the group without refreshing the page.

However, if I'm not mistaken, the cfinput allows for a required parameter.
You may want to look into that further.  I've never used cfinput or cfform.
I like the old fashioned way of coding better...


-----Original Message-----
From: Matthew Hood [mailto:[EMAIL PROTECTED]] 
Sent: Saturday, May 12, 2001 2:44 PM
To: CF-Talk
Subject: Slightly OT: Form Validation Woes


Ok, here is the problem:
    I have various sets of radio buttons on a page. 4 sets to a page
actually. I need a javascript that will validate that a radio button has
been selected for each of the four sets. Being no good a javascript I am
turning to you for help. ( I know this isn't a cold fusion question per say
but the values are entered into a DB when all is said and done.) Is there a
script that can run through each set and verify that a selection has been
made, without having to manually edit the script for each page and inputting
the names?

Here is a what the radio buttons look like:
<TD>
<cfinput type="Radio" name="WPAvailability" value="5" tabindex="1">5<br>

<cfinput type="Radio" name="WPAvailability" value="4" tabindex="2">4<br>

<cfinput type="Radio" name="WPAvailability" value="3" tabindex="3">3<br>

<cfinput type="Radio" name="WPAvailability" value="2" tabindex="4">2<br>

<cfinput type="Radio" name="WPAvailability" value="1" tabindex="5">1<br>

<cfinput type="Radio" name="WPAvailability" value="0" tabindex="6">N/A </TD>
<TD> <cfinput type="Radio" name="WPProficiency" value="5" tabindex="1">5<br>
<cfinput type="Radio" name="WPProficiency" value="4" tabindex="2">4<br>
<cfinput type="Radio" name="WPProficiency" value="3" tabindex="3">3<br>
<cfinput type="Radio" name="WPProficiency" value="2" tabindex="4">2<br>
<cfinput type="Radio" name="WPProficiency" value="1" tabindex="5">1<br>
<cfinput type="Radio" name="WPProficiency" value="0" tabindex="6">N/A </TD>
<TD> <cfinput type="Radio" name="WPImportance" value="5" tabindex="1">5<br>
<cfinput type="Radio" name="WPImportance" value="4" tabindex="2">4<br>
<cfinput type="Radio" name="WPImportance" value="3" tabindex="3">3<br>
<cfinput type="Radio" name="WPImportance" value="2" tabindex="4">2<br>
<cfinput type="Radio" name="WPImportance" value="1" tabindex="5">1<br>
<cfinput type="Radio" name="WPImportance" value="0" tabindex="6">N/A </TD>
<TD> <cfinput type="Radio" name="WPFrequency" value="5" tabindex="1">5<br>
<cfinput type="Radio" name="WPFrequency" value="4" tabindex="2">4<br>
<cfinput type="Radio" name="WPFrequency" value="3" tabindex="3">3<br>
<cfinput type="Radio" name="WPFrequency" value="2" tabindex="4">2<br>
<cfinput type="Radio" name="WPFrequency" value="1" tabindex="5">1<br>
<cfinput type="Radio" name="WPFrequency" value="0" tabindex="6">N/A </TD>



Any help would be GREATLY appreciated! Thanks.

Matthew Hood
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to