开发者

Validating PDF form fields before printing

开发者 https://www.devze.com 2023-02-10 17:26 出处:网络
I have a fillable PDF form that I would like to validate before the user prints it out. Here is my form:

I have a fillable PDF form that I would like to validate before the user prints it out.

Here is my form:

http://www.pentco.com/orderforms/pentco_creditapp_v2011b.pdf

I've looked online for a simple solution and I think I've found it. It is here:

http://www.alqemy.com/Forms/RequiredFields.pdf

I've looked at its field and button properties, but for the life of me I cannot figure out how it works. There is one line of code 开发者_如何转开发attached to the button behaviour and that's it.

Can someone tell me what I'm missing to put the same validation function in this form into mine?

Pete


The validateFields() method (used on button's mouse up event) is defined at document level. With Acrobat select 'Edit All JavaScripts' menu item and you will see the code for this method. It can be reused very easy, you just have to set tooltips for all required fields and these tooltips must end with '*' (this is how the method determines if a field is required).


This worked perfect...thanks for pointing out where to find that JavaScript. If others are confused:

You need to be in form edit

Then you go to Advanced-->Document Processing-->Edit All Javascript...

You will find the Validation code there. You want to copy it and add it to your print button's Javascript

0

精彩评论

暂无评论...
验证码 换一张
取 消