I'm creating a registration form with ColdFusion. One of the requirement is for user to select a value from a drop down. When one of the option is selected, the next textbox field need to be fill in so this field becomes required field. If user does not select any option from a drop down then this texfield can be left blank. I'm not good with Javascript, is there a way to get some free sample? Here is my form fields:
<cfselect name="OtherContact" class="inputSelect">
<option value="">--- Select other contact ---</option>
<option value="HomePhone">Home Phone</option>
<option value="HomeFax">Home Fax</option>
<option value="HomeEmail">Home Email</option>
</cfselect>
<cfinput type="text" name="OtherContactId" value="#Form.OtherContactId#" class="inputText">