Adding field data to subject line and body of email

Avatar

Avatar

Benji842

Avatar

Benji842

Benji842

23-11-2010

HI

I have created a form that can be submitted by e-mail. I would like the data entered into the form to populate the subject line and body of the email but have no idea of how to script this. I would be grateful if someone could have a look at the form and see how I can achieve this.

For example

subject line: Travel and accommodation form [Name] [EventName] [StartDate]

Body:

Please open the attached travel and accommodation for for [Name] who will be attending [EventName] on the [Start Date]

Here is the code for my button:

<field name="Submit" y="219.075mm" x="139.7mm" w="34.925mm" h="6mm">
            <ui>
               <button/>
            </ui>
            <font typeface="Myriad Pro"/>
            <caption>
               <value>
                  <text>Submit</text>
               </value>
               <para vAlign="middle" hAlign="center"/>
               <font typeface="Myriad Pro"/>
            </caption>
            <border hand="right">
               <?templateDesigner StyleID apbx2?>
               <edge stroke="raised"/>
               <fill>
                  <color value="212,208,200"/>
               </fill>
            </border>
            <bind match="none"/>
            <event activity="click">
               <submit format="pdf" textEncoding="UTF-16" target=mailto:myaddress@test.com xdpContent="pdf datasets xfdf"/>
            </event>
         </field>


Please excuse my ignorance as not competent with XML so any help would be gratefully received. Have already tried some methods posted on here already but not helped.

View Entire Topic

Avatar

Avatar

Rui_Esteves

Avatar

Rui_Esteves

Rui_Esteves

24-11-2010

Put it in the Click event of a Button with the control type set to regular.