Skip to main content
January 14, 2009
Answered

cfinput Required = yes not working with type=radio

  • January 14, 2009
  • 2 replies
  • 503 views
For some reason I am not getting the warning pop up if no radio buttons are selected. The following code is within a cfform. I thought it was maybe because I had named the variable "type" but that was not the case. Any thoughts?

    This topic has been closed for replies.
    Correct answer
    I thought it had worked before, but perhaps I am mistaken.

    Having one set as selected isn't the perfect solution, but it will resolve the issue.

    Thanks,

    Brett.

    2 replies

    Inspiring
    January 15, 2009
    If you want to use "regular" radio inputs and not cfinputs, you can use Spry. It's pretty neat.
    Take a look at some of these examples: http://labs.adobe.com/technologies/spry/samples/validationwidgets/RadioValidationSample.html.
    Inspiring
    January 14, 2009
    It doesn't work with radio buttons.
    An easy solution is to make one of them selected.
    Correct answer
    January 14, 2009
    I thought it had worked before, but perhaps I am mistaken.

    Having one set as selected isn't the perfect solution, but it will resolve the issue.

    Thanks,

    Brett.