Expand my Community achievements bar.

Another question on closing the form

Avatar

Level 2

I have read all of the discussions on how to close a form and I am still not getting it. I have a form that needs to be emailed when submitted and then I want it to close. I am unsure on where to even put the scripting for the button. Can someone please help me? I noticed that I cannot insert my form, but I can email it to someone. Thanks so much!

5 Replies

Avatar

Level 10

Can you try placing the following command in the postSubmit event with Java Script as Language..

app.execMenuItem("Close");

Thanks

Srini

Avatar

Level 2

form1.#subform[0].Button1::postSubmit:form - (JavaScript, client)

app.execMenuItem("Close");

When I put in there, I get the following error:

Button1 = Target version does not support the postsubmit event.

Avatar

Level 10

The command works from Adobe Reader 8.1 onwards.

You can change the target version by going to File menu -> form Properties. Select Default tab and change the Target version.

Thanks

Srini

Avatar

Level 2

Okay, I changed the target version and it seems to work when I don't distribute the form. On the distributed form, it will not close. Any other suggestions?

Avatar

Level 10

You need to reader extend the form to work.. Open the form in Acrobat Pro and choose Advanced menu -> Extend Features in Adobe Reader and save the file..

Thanks

Srini