Hello -
I have been working on a PDF form using Acrobat 9 Pro. The form will not be submitted with a submit button but rather filled out and saved by the user.
So, I have been using JavaScript under Actions>On Blur
I have been through a few different scripts because initially I could not get the JavaScript that was in the Adobe Development Tips to work on both a PC and a Mac. Then, someone in these forums was kind enough to help me and it worked. The only problem is that now if I click inside of a required form field without typing anything and then click inside of another required form field the cursor does not stay in the first required form field that I clicked out of. It moves to the next required form field. Is there a way to make the cursor stay in the first required form field until you fill it out? So in other words you cannot click inside of another form field until you fill out the required one that you clicked into.
The correct popup message appears when you leave the first field without filling it out and click into another field but I want the user not to be able to even click into another required field until they fill out the one they clicked into first.
Here is the script I am using:
f = getField(event.target.name)
if (f.value.length == 0)
{
// f.setFocus()
//Optional Message - Comment out the next line to remove
app.alert("This field is required. ")
}
Many thanks! ![]()
Hi George,
I tried your script. The popup message "This field is required" will not go away when I click from one required field (without filling it out) into another blank required field. I keep hitting "okay" on the popup but it just stays there. So, I have to do a "force quit" to get out of it.
Thanks so much for taking the time to try and help. ![]()
North America
Europe, Middle East and Africa
Asia Pacific