HI I am new to adobe acrobat, I am creating a form with a bunch of required text fields, radio button and check boxes. I would like to know if anyone can help me fins a way of making sure all the required fields are entered before i allow them to print & save?
I tried to use the validate field ()* on the print button but nothing works.
I tried using the script:f = getField(event.target.name)
if (f.value.length == 0)
{
//Optional Message - Comment out the next line to remove
app.alert("This field is required. Please enter a value.")
f.setFocus()
} to validate each individual field but it does not work on the radio button and on the text field it locks up.. i ahd to go to the task manager and shut down the program.
Please help as this is the final piece to complete my form.
What you need to do is to loop over all of the fields, chceking which ones are required and if so, if they have a value (note that different field types have different "empty" values), and if so, show a message and abort the operation. I posted a generic function that does this a while ago. If you want, I can look it up.
- AcrobatUsers Community Expert - Contact me personally at try6767 [at] gmail [dot] com
Check out my custom-made scripts website: http://try67.blogspot.com