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

Custom Message box with Action Button

PearTree
Registered: Apr 29 2010
Posts: 2

I managed to create a regular button to act as an Email submit button with custom message box and have also scripted it to populate a subject line based on a field on my form. Question is...

The script I have now only has an Ok button to allow the user to open their desktop mail application.

I was wondering if there is a way to add a Cancel button to the Message box as well that upon clicking will open up the "Save As" menu item so the user that uses a web based email client can automatically save and manually email the form. (kind of like the options when you create a submit email button) Is this possible? I would use the regular "submit " button however my client wanted a custom subject based on a text field.

I am using Adobe 9.0 Pro with LiveCycle in Windows vista.

Here is the script I have now ( I am just missing the action to create a cancel button that will trigger the "save as" box:

xfa.host.messageBox ("Click OK to continue if you are using a desktop E-mail client such as Microsoft Outlook, Eudora, or Mail"
+

"\n\nIf you are using a "
+
"web based E-mail client, such as Yahoo, Gmail, or Hotmail please press Cancel to save this form and "
+
"manually email it to: millward [at] millwardinsurance [dot] com\n\nThank you."
, "Email Instructions", 3, 0);
xfa.host.beep("3");
var vSubject="Certificate Request Form - " + CompanyName.rawValue
var vEmail="millward [at] millwardinsurance [dot] com"
var vBody="Please review and process the attached PDF form."

event.target.submitForm({cURL:"mailto: "+ vEmail +"?subject=" + vSubject +"&body=" + vBody, cSubmitAs:"PDF", cCharset:"utf=8"});

I REALLY appreciate any help!!
Brenda Lee

My Product Information:
LiveCycle Designer, Windows
radzmar
Expert
Registered: Nov 3 2008
Posts: 1202
you need to wrap you script into an if-expression

if(xfa.host.messageBox("some text...", "title", 2,2)==4){//code to execute if "Yes" was clicked}else{//code to execute if "No" was clicked}

Check out the Designer reference manual for more information.

radzmar
LoveCycle Blog
Documents you need:
LiveCycle Designer ES2 Docs