customizing email body on email submit button | Community
Skip to main content
Level 2
Sep 2, 2011 2:28 PM UTC
Question

customizing email body on email submit button

Hi everyone,

I'm trying to modify what the body of the email will look like once the user has pressed an email submit button. In Livecycle designer, I clicked on the button and viewed the xml source. I scrolled down to the following line:

               <submit format="xml" textEncoding="UTF-8" target="mailto:test&test.com?subject=My subject"/>

Then changed it to:

               <submit format="xml" textEncoding="UTF-8" target="mailto:test&test.com?subject=My subject?body=new body"/>

When I tested the button, the text "?body=new body" was appended to the subject line instead of being included in the body itself.
I wondered if anyone could tell lme where I'm going wrong?
Appreciate any help.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

20 replies

gwhPosterAuthor
Level 2
Sep 27, 2011 4:28 PM UTC

Hi,

Instead of using the email object from the Custom library, use a regular button and choose "Submit" as the control type. Then in the Submit tab, in the "Submit to url" field, add something like the following:

mailto:test@test.com?subject=Application Form&body=new body

Hope that helps.

Translate
New Participant
Sep 27, 2011 3:34 PM UTC

gwhPoster:

How to fix the problem? What changed?

I need to change the body of the message and not as ...

Please, I need your help.

thanks.

Translate
gwhPosterAuthor
Level 2
Sep 9, 2011 6:02 AM UTC

Yeah I meant to say that I was editing the xml source, and not using the script editor.

Thanks for agreeing to look at my file which I've sent by email.

Radzmar: thanks also for the link to your macro - I will keep this in my for future projects.

Translate
radzmar
Level 10
Sep 6, 2011 2:45 PM UTC

Hi,

if you need an easy way to design the mailTo button you can use my macro for Designer (9.x and 10.x).

It will add a mailTo script to a regular button.

http://thelivecycle.blogspot.com/2011/07/mailto-maker-macro.html

Translate
Sep 6, 2011 1:18 PM UTC

It looks like you are changing the xml source directly and have introduced an error nstead of using the script editor.  If you send the form to LiveCycle8@gmail.com I will have a look

Paul

Translate
gwhPosterAuthor
Level 2
Sep 6, 2011 12:32 PM UTC

No I didn't copy and paste at all. I just revised the code manually in the code editor. Do you know what the error means?

Translate
Sep 6, 2011 12:27 PM UTC

Did you just copy and paste form the forum into the script editor or did you do it some other way?

Paul

Translate
gwhPosterAuthor
Level 2
Sep 3, 2011 2:08 PM UTC

I'm basically trying to remove the default email body that appears when the "submit by email" button is clicked, ie:

The attached file contains data that was entered into a form. It is not the form itself.


The recipient of this data file should save it locally with a unique name. Adobe Acrobat Professional 7 or later can process this data by importing it back into the blank form or creating a spreadsheet from several data files. See Help in Adobe Acrobat Professional 7 or later for more details.

I can't even find the above text in the xml code so I dont' even know how to remove it.

Any further help with these problems, would be much appreciated.

Translate
gwhPosterAuthor
Level 2
Sep 2, 2011 10:20 PM UTC

Thanks for the reply,

I've tried your code however I get the following error:

The following error was found with the XML source:

Xml parsing error: not well-formed (invalid token) (error code 4), line 2430, column 176 of file

Do you know what this means?

Translate
Sep 2, 2011 2:41 PM UTC

When using the mailto the parameters are preceded by a ? and all subsequent parameters are separated

by an &. Also the email address needs an @ not an &. So your command woudl be:

<submit format="xml" textEncoding="UTF-8" target="mailto:test@test.com?subject=My subject&body=new body"/>

Paul

Translate