I have created a dynamic form with a "regular" button that submits the completed form via email using the following click event script:
var oDoc = event.target;
From here, I need to Hide/Lock the 'submit' "regular" button, and lock all editable fields once the form is completed and sent.
The goal is that once the form is filled out and emailed, recipients will have a "read only" report.
I'm using LC Designer 8.0 to create this form. I also have Acrobat 8 Pro.
Any advice given is greatly appreciated.
To clarify, the PDF form is completed by clicking on the button I've scripted to generate an email.
The completed form is not saved by the user filling out the form.
I need the "regular" button that is used to generate the email to lock or hide itself as well as lock all fields making the form read only for those that receive the email.
Again, thanks in advance for any advice given.
If it's emailing you back the pdf, it has to save first. If it's not going to be saved, there's not much point in locking the fields, is there?
The link I supplied has Paul's sample showing how to lock all fields.
If the pdf is being emailed back to you, then you could add a "save-as" prompt.
At the end your script, you can set the button to readOnly or set it's presence to hidden.
So you'd script the lock all fields, then your email script, then hide the button.
Unless I'm missing what you mean.
The blank form, will already be available to the users that will be filling it out through a shared drive.
They will fill it out and submit it via the script button but will not save the completed form (as they have no need for keeping them), once management receives it they will review the report and they will save it for documentation purposes.
We've already tested this in a beta version of the form and this much works fine.
What we'd like to do is have the completed PDF that is generated in the email, but not yet saved anywhere else, effectively be a "read only" document.
This is where my questions regarding hiding the button and locking the fields comes in.
Now with all this said, would scripting a CLICK event (lock fields > email doc > hide button) accomplish this?
Thanks for your patience and advice.
Ok scripting for emailing and hidding the button works, but locking fields does not.
What are some alternatives? A script for making the Fields "read only"? Script for flattening the fields?
Note: LC Designer 8 and Acrobat Pro 8 are the two programs I'm using. Form was created primarily in LC.
Is making the form part of a workflow an option for you? You could have the form print to the Adobe PDF printer to flatten the fields and then submit the flattened PDF.
After picking at it for a while the solutions that accomplished my goals were as follows:
button.presense = "invisible"; \\ hides the button
field1.access = "readOnly";
field2.access = "readOnly"; \\ repeat for all fields
var oDoc = event.target;
}); \\ script for emailing the form
Thanks for the input.
I know this is a really old thread but Im desperately trying to achieve the same thing for a client who is getting very impatient!