I'm a little new to using cfinput. I always use HTML input.
I have radio buttons for gender. When the form is submitted, the value is entered into a db column 1 or 2:
<cfinput name="g" id="g" type="radio" value="1" required="yes" /> F<cfinput name="g" id="g" type="radio" value="2" />
I want to check one by default depending on the value stored in the db column when the form loads.
I'm able to use a CFIF statement to check one by default in the HTML radio like:
<cfif rs.g eq 1>checked="true"</cfif>
but you're not allowed to have cfif in a single cfinput tag.
How do I do it.
I have radio buttons for gender. When the form is submitted, the value is entered into a db column 1 or 2:
<cfinput name="g" id="g" type="radio" value="1" required="yes" /> F<cfinput name="g" id="g" type="radio" value="2" />
I want to check one by default depending on the value stored in the db column when the form loads.
I'm able to use a CFIF statement to check one by default in the HTML radio like:
<cfif rs.g eq 1>checked="true"</cfif>
but you're not allowed to have cfif in a single cfinput tag.
How do I do it.