These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

How to make some of the fields in a row in a table 'required'?

DavidCouper
Registered: Apr 2 2011
Posts: 7

I have a table with multi rows with some of the field 'required'. However not all the rows will necessarily be populated.
 
(How) Can I make the required fields dependent on the initial field being filled in?
 
E.g. name; address; ss no; phone no; dob
If name is filled in, address and dob are 'required' but not the other fields.
  

My Product Information:
Acrobat Pro 8.1.7, Windows
maxwyss
Registered: Jul 25 2006
Posts: 255
This is possible.

You would add the following to the Format event of the initial field in the row:

if (event.value != event.target.defaultValue) {
this.getField("dependent1").required = true ;
} else {
this.getField("dependent1").required = false ;
}

assumed that your field to make required is named "dependent1".

You repeat the setting and resetting line for all fields that you want to be required.

Hope this can help.

Max Wyss.

DavidCouper
Registered: Apr 2 2011
Posts: 7
Thanks for that Max.

My editing makes it look like

if (event.value != event.target.defaultValue) {
this.getField("text3").required = true ;
} else {
this.getField("text3").required = false ;
}
if (event.value != event.target.defaultValue) {
this.getField("text6").required = true ;
} else {
this.getField("text6").required = false ;
}
if (event.value != event.target.defaultValue) {
this.getField("text7").required = true ;
} else {
this.getField("text7").required = false ;
}

Updated for each of 8 rows.

However, it doesn't seem to work in my form.

If you'd like to look at a copy, let me know.

Thanks.