I have form in Adobe Standard 9: I would like to have the form 'lockout' followup questions or 'skip' to the next question, if the answer to the previous question is X.
Example:
Question 1: Are you reporting a problem? Yes or No (Choose from a Combo Box)
If the answer is "Yes" the user answers questions 1a, 1b, etc.
If the answer is "No" the user either cannot answer 1a, 1b, etc. or is authomatically directed to question 2.
thank you
// Validate script for combo box
(function () {
// Get references to the secondary fields
var f1 = getField("1a");
var f2 = getField("1b");
var f3 = getField("1c");
// Continue for as many fields as needed
// Reset the fields
resetForm([f1.name, f2,name, f3.name]);
switch (event.value) {
case "Yes":
f1.display = display.visible;
f2.display = display.visible;
f3.display = display.visible;
break;
case "No":
f1.display = display.hidden;
f2.display = display.hidden;
f3.display = display.hidden;
break;
}
})();
This code could be simplified a lot if you use a hierarchical naming convention for the secondary fields. Something like: 1.a, 1.b, 1.c, etc. If you'd like help with that, post again.