How do I work with Javascript and Check Boxes?
I’m completely lost.
I am working on a form that has several check boxes that I want to generate text based on whether the box is checked or not.
Example:
A field named “form required” has a check box. The text I want to generate is:
If the check box for “form required” is blank (false), the text output is: “\nForm Required: No”
If the check box for “form required” is checked (true), the text output is: “\nForm Required: Yes”
How can I do this in Javascript? How do I get the value to update dynamically?
This code does not work:
if(this.getField(“form required”).value)
event.value=”Form Required: Yes”;
else
event.value=”Form Required: No”;
And I’m not sure how isboxchecked works either.
Please advise. Thank you.
