cancel
Showing results for 
Search instead for 
Did you mean: 

Close form after click on send button

Former Member
0 Kudos

Hello,

I would like the adobe form to close after the user clicked on "send by email" button.

I found this code to do it automatically :

app.execMenuItem("Save");

app.execMenuItem("Close");

But I don't see where I can write it as I can't modify the click event.

Any idea ?

Thanks in advance

Accepted Solutions (1)

Accepted Solutions (1)

OttoGold
Active Contributor
0 Kudos

Hello,

as far as I know this is called a "silent save" and these "silent" operations are not allowed because it is a security risk. I am afraid this is not possible. But we can wait for somebody to give a solution. But these questions will be probably more precisely and quickly answered directly in the Adobe forums on Adobe.com.

Regards Otto

Former Member
0 Kudos

I, indeed, wanted to do a silent save, but my real need is not to save the document (I don't need to save it as it has just been sent), I would like to exit the document without saving and without asking for any confirmation.

andrs_sarcevic
Contributor
0 Kudos

The exit confirmation must come from the Adobe Reader itself... I don't think it has anything to do with the form development. So, besides the silent-save as Otto pointed out, I can't think of anything else.

Regards,

A.

Answers (1)

Answers (1)

andrs_sarcevic
Contributor
0 Kudos

I don't know if this will work, but what if you have another button that triggers the submit event and the code to close the form later on? Hide the actual submit button from your layout.

"Normal Button" code:

SubmitButton.execEvent("click");

app.execMenuItem("Save");

app.execMenuItem("Close");

Cheers,

Former Member
0 Kudos

Thanks it's working !

The only problem now, is that the form ask me if I want to save the doc before exit...

I would like the form to close without asking anything.