Skip to main content
Inspiring
August 30, 2008
Question

cfinput question

  • August 30, 2008
  • 1 reply
  • 250 views
Since I do not know javascript, I use cfinput to validate all of my input fields and checkboxes and radios buttons.

However, there are cases where javascript is requried. I was given the code to disply two input fields based on a radio button selection. If the yes button is selected, the two input fields popup for entry. If the no button (default checked) is selected, the input fields will not come up. Works fine.

If the yes button is selected and the two input fields come up, they are required for entry. I tried to use the cfinput validation for this also. But it validates even if the no button is selected and the input fields do not come up.

Is there a way to get the cfinput validation to work only if the yes button is selected and the input fields come up ?
    This topic has been closed for replies.

    1 reply

    Inspiring
    August 31, 2008
    trojnfn,

    I would use something along the lines of: