admin管理员组文章数量:1331435
I have a fillable PDF form that I would like to validate before the user prints it out.
Here is my form:
I've looked online for a simple solution and I think I've found it. It is here:
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
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./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./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
Share Improve this question asked Feb 16, 2011 at 17:43 NeuwbsNeuwbs 371 gold badge1 silver badge7 bronze badges2 Answers
Reset to default 5The 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
本文标签: javascriptValidating PDF form fields before printingStack Overflow
版权声明:本文标题:javascript - Validating PDF form fields before printing - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742257036a2441815.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论