Expand my Community achievements bar.

Close form after submit

Avatar

Level 8
Level 8
Hi all,



I am not a Designer expert, so please bare with me if this is a stupid question.



I want to close the form after I have submitted the data and I want to do it with a normal submit button on the form. Is this possible, or is it at all possible to close a form (or Reader/Acrobat in general) from a button inside aform.



Thanks in advance



Sincerely

Kim
4 Replies

Avatar

Former Community Member
You cannot program against a submit button......so you will have to tae your submit button and make it invisible. Then place a regular button on the form (you can program agianst that one). You can use this command to cause the submit to happen:



submitbuttonname.execEvent("click");



Now to close the doc you can use the command:



app.execMenuItem("Close")



This will close the currently active doc but will not close the hosting application (browser, Reader or Acrobat)

Avatar

Level 8
Level 8
Thanks Paul,



I knew the stuff with the invisible submit button, but needed the



app.execMenuItem("Close")-command, it works perfectly...



Sincerely

Kim

Avatar

Former Community Member
Hi,



Is possible use this scritp to launch a "Signature Field"?



I need to sign but not making click directly onto "signature Field", i need launch this action making click on a button.



Is possible?



Thanks.

Avatar

Former Community Member
Nope you cannot programmatically sign a signature field. You must click on the field to sign it.