I’ve created a form with some fields and button to send it through e-mail. This button should send the form with the filled in information in PDF format and, before being sent, some of the form fields should be made read only so no one else can change the fields contents.
To reach this end, I used the following script:
However, when the file is sent the fields are not locked (read only), they can still be edited.
Thank you for any hints!
That is because you are using a button of type Submit. Thise buttons cannot be programmed. I suggest adding a second button (that is a regular button) and then the click event will be active. Add you code to that button and at the end of your code you can programmatically click the submit button like this your_button_name.execEvent("click") . After that you can make your submit button invisible so that the user only sees one button to click.
Hoep that helps