These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

email submit button dynamic variables?

cfinley
Registered: Jan 9 2008
Posts: 70

hi,

i know dropdown boxes can be populated with email addresses, but is there a way to tie that field into the submit email button so it will change who it is sent to based on the selection in the dropdown box?

also, is there a way to tie the subject line of the email sent to a text field within the pdf? something so it would have the name of a part number or project rather then just constantly receiving pdfs with the same title and having to open them to tell the difference between them..

thanks!

DominicanPete
Registered: Jan 4 2008
Posts: 41
What you want to do is not possible with the Email Submit button. It IS possible with a regular push button, and some javascript attacted to the 'click' event of the button. You will need something like this:


var myDoc = event.target;
myDoc.mailDoc({
bUI: false,
cTo: EMail_List.rawValue,
cSubject: Subject.rawValue,
cMsg: msg.rawValue
});
}

This javascript snippet has the following attributes:

EMail_List was a hidden text field that i created to contain the string for recipient(s). I used check boxes rather than a drop down list. Whenever a check box was changed, i updated the field with the new list. If you want to send to more than one email address, concatenate your addresses together in a single field and separate each address with a semi-colon.

Subject.rawValue was another text field on the form. You can assign it whatever value you choose. This is also true of msg variable.

Make sure that your language is JavaScript for the code. Run At: must be set to 'Client'.

This is a more flexible way of sending off the email as you have a bit more control over what goes on.