0
Radio button validation
New Here
,
/t5/coldfusion-discussions/radio-button-validation/td-p/763529
Feb 19, 2009
Feb 19, 2009
Copy link to clipboard
Copied
Using coldfusion validation only, how can I make a radio
field required? For example, the below code does not work:
<cfinput type="radio" name="test" value="yes" required="true" message="You must enter a value for test">
<cfinput type="radio" name="test" value="no" required="true" message="You must enter a value for test">
<cfinput type="radio" name="test" value="yes" required="true" message="You must enter a value for test">
<cfinput type="radio" name="test" value="no" required="true" message="You must enter a value for test">
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
New Here
,
/t5/coldfusion-discussions/radio-button-validation/m-p/763530#M71015
Feb 19, 2009
Feb 19, 2009
Copy link to clipboard
Copied
try using <cfif arounf your radio buttons
<cfif this condition
Radio1
<cfersle>
radio2
<cfif this condition
Radio1
<cfersle>
radio2
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
LEGEND
,
/t5/coldfusion-discussions/radio-button-validation/m-p/763531#M71016
Feb 19, 2009
Feb 19, 2009
Copy link to clipboard
Copied
Pre-select one.
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
LEGEND
,
LATEST
/t5/coldfusion-discussions/radio-button-validation/m-p/763532#M71017
Feb 19, 2009
Feb 19, 2009
Copy link to clipboard
Copied
just make one of your radio buttons pre-selected (i.e. the
default choice).
in a radio group only one of buttons can be selected at a time, and if
you have one pre-selected then one of the buttons will always be
selected because a radio button can't be 'un-checked'.
Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com/
in a radio group only one of buttons can be selected at a time, and if
you have one pre-selected then one of the buttons will always be
selected because a radio button can't be 'un-checked'.
Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com/
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more

