Skip to main content
charlenen42546039
Participant
April 19, 2017
Answered

Check boxes

  • April 19, 2017
  • 1 reply
  • 898 views

I am new to acrobat dc.  I have several check boxes all with different names that I want to trigger the cursor to move back to a text field and change it to "required"

for instance if Check box "Corporation"  or "Partnership" or "L.L.C"is checked, the fields NameRow1,TitleRow1,PhoneRow1,EMailRow1 all become "required" and the form cannot be completed without at least row one being filled out.

Please help me.

I am new to acrobat, and to javascript

This topic has been closed for replies.
Correct answer George_Johnson

You can't force a user to complete a form before saving/closing/printing. If a text field that's marked as required is blank when a form is submitted ("Submit a form" action or submitForm JavaScript), the submit won't take place.

You can use JavaScript in various ways to check for blank required fields and alert the user before saving/closing/printing, but you can't prevent these actions. If you provide more details about the specific behavior you want, we can probably help.

1 reply

George_JohnsonCorrect answer
Inspiring
April 19, 2017

You can't force a user to complete a form before saving/closing/printing. If a text field that's marked as required is blank when a form is submitted ("Submit a form" action or submitForm JavaScript), the submit won't take place.

You can use JavaScript in various ways to check for blank required fields and alert the user before saving/closing/printing, but you can't prevent these actions. If you provide more details about the specific behavior you want, we can probably help.

charlenen42546039
Participant
April 19, 2017

Thank you.

I want the above mentioned check boxes to trigger the text fields to have a red border or other attention getting feature so they are not forgotten.  Is that possible? I know it cannot be guaranteed but would like to at least the reminder if possible.

try67
Community Expert
Community Expert
April 19, 2017

While it's true you can't prevent the file from being printed/saved, you can force it to print blank, ie with all of the form fields empty.

I've developed a tool that allows you to easily set that up: Custom-made Adobe Scripts: Acrobat -- Validate Required Fields Before Printing or Saving