Question
How to check if a specific radio button value is selected
Hi,
I am a newbie and need some help with validating radio button values. Basically, I need to set parameter values based on which radio button is selected. Below is my code but it doesn't work - I think "<cfif #price# is "l_350">" is wrong.
Please help!!!!
Thanks a lot in advance!
HTML:
<radio name="price" value="l_350"> $350
<radio name="price" value="m_300"> $300
<radio name="price" value="s_250"> $250
CF:
<cfif #price# is "l_350">
<cfparam name="t1" default="350">
<cfelse>
<cfparam name="t1" default="0">
</cfif>
<cfif #price# is "m_300">
<cfparam name="t1" default="300">
<cfelse>
<cfparam name="t1" default="0">
</cfif>... so on.
I am a newbie and need some help with validating radio button values. Basically, I need to set parameter values based on which radio button is selected. Below is my code but it doesn't work - I think "<cfif #price# is "l_350">" is wrong.
Please help!!!!
Thanks a lot in advance!
HTML:
<radio name="price" value="l_350"> $350
<radio name="price" value="m_300"> $300
<radio name="price" value="s_250"> $250
CF:
<cfif #price# is "l_350">
<cfparam name="t1" default="350">
<cfelse>
<cfparam name="t1" default="0">
</cfif>
<cfif #price# is "m_300">
<cfparam name="t1" default="300">
<cfelse>
<cfparam name="t1" default="0">
</cfif>... so on.