Skip to main content
stepheng54012748
Known Participant
January 7, 2025
Answered

Question on forcing a field to be entered on a form

  • January 7, 2025
  • 2 replies
  • 316 views

Wondering if it's possible to force someone to fill in a certain field on a form before they can move along filling out the rest of the form.  I wrote a Java script that will take them to line i want to be filled out but it would be nice if i can keep them from moving on filling out the rest of the form until the line is complete.  I know could do a pop up alert but it would be nice to prevent going any further until the cell is completed.  does this make sense?

Correct answer PDF Automation Station

Enter the following as an On Blur JavaScript in the actions tab of the field:

if(!event.value){event.target.setFocus()}

2 replies

try67
Community Expert
Community Expert
January 7, 2025

This is technically possible, but a very bad idea. What if they wanted to save and close the file? Or if they entered the field by accident and want to move away from it? Preventing them from doing it can cause a lot of issues. If you implement this you can expect angry calls from your users, I can assure you.

PDF Automation Station
Community Expert
Community Expert
January 7, 2025

Enter the following as an On Blur JavaScript in the actions tab of the field:

if(!event.value){event.target.setFocus()}

stepheng54012748
Known Participant
January 7, 2025

PERFECT!!