silencer01
11-17-2003, 07:10 PM
Hi All,
I have a form that has a number of radio boxes and input fields for the user to select from. The form is part of a survey. The problem is that the form relies on a form field being populated once submitted. If the user decides that they don't want to answer the question (which is a valid option for the survey). It will cause a error when updating the database later in the process.
What i need the form to do is check to see if the user has input any information into the form field if not populate a hidden field.
It would be something like this:
<form name="form" method="post" action="question.cfm" onsubmit="return checkForm(this)">
<input type="radio" name="q1" value="yes">
<input type="radio" name="q1" value="No">
<textarea name="q1" cols="75" rows="5" wrap="virtual"></textarea>
<input type="submit" name="Submit" value="submit">
</form>
<!--- if form has been answered go to question.cfm ---->
<!--- if form has not been answered add --->
<input type="hidden" name="q1" value"no response">
<!--- then go to question.cfm ---->
Thanks
Jake A.
I have a form that has a number of radio boxes and input fields for the user to select from. The form is part of a survey. The problem is that the form relies on a form field being populated once submitted. If the user decides that they don't want to answer the question (which is a valid option for the survey). It will cause a error when updating the database later in the process.
What i need the form to do is check to see if the user has input any information into the form field if not populate a hidden field.
It would be something like this:
<form name="form" method="post" action="question.cfm" onsubmit="return checkForm(this)">
<input type="radio" name="q1" value="yes">
<input type="radio" name="q1" value="No">
<textarea name="q1" cols="75" rows="5" wrap="virtual"></textarea>
<input type="submit" name="Submit" value="submit">
</form>
<!--- if form has been answered go to question.cfm ---->
<!--- if form has not been answered add --->
<input type="hidden" name="q1" value"no response">
<!--- then go to question.cfm ---->
Thanks
Jake A.