Copy link to clipboard
Copied
Hello, I am new to this form creating and having to create a simple form with all yes & no responses, however after creating the drop down fields I get lost on the java script ( way over my head) I want to create a if/then statement in Acrobat. If they answer yes, additional comments must me answered. If no, then no additional questions are needed.
Copy link to clipboard
Copied
So you want to make a field hidden or visible based on the selection in the drop-down, basically?
Copy link to clipboard
Copied
Hi, It does not have to be hidden, Working on a questionnaire set up with yes / no answers on a drop downs . I wanted to require people to comment if they selected Yes on drop down. Sorry I am so new to this, the creating part of the form was pretty user friendly for starters like me, but the java script is a bit overwhelming after reading / seeing some tutorials,
Copy link to clipboard
Copied
Then you need to define what "require" means. In what way should it be required? How should it be enforced?
Is the file being submitted back to you? If so, you can set the field's "required" property to prevent it from being submitted.
Copy link to clipboard
Copied
By require I meant, If they answer yes on any of the questions, they will need to answer why they said yes in a additional comment field that I need to set as required to fill out.
Copy link to clipboard
Copied
That doesn't answer my question, so let me rephrase: What should happen if they don't fill in that additional comments field?
Copy link to clipboard
Copied
sorry, if they dont fill out tha additional field it will not let them submit the form.
Copy link to clipboard
Copied
OK. In order to do that you need to set the field as required.
As the custom calculation script of the comments field you can enter something like this:
event.target.readonly = (this.getField("Dropdown1").valueAsString=="Yes");