Conditional cfinput required
I am new to coldfusion. I created a cfform and I want to set a cfinput required to "yes" based on the previous radio selection. Here is a sample of the form I did.
<cfform action="index_act.cfm" method="post" name="scheduleChange" id="contest">
<p><cfinput type="radio" name="type" id="type" value="Meeting">Meeting</p>
<p><cfinput type="radio" name="type" id="type" value="Vacation">Vacation</p>
<p>Total day(s):<cfinput name="totalDay" type="text" id="totalDay" required="yes" message="Please enter Total days(s)"></p>
</cfform>
If the user select Meeting, the Total day(s) is not required.
If the user select Vacation, the Total day(s) is required.
Is this possible? Can I dod this with cfif? How? I am using MX. Any help is greatly appreciated.
