Expand my Community achievements bar.

Populate E-mail Subject with Data from Form

Avatar

Former Community Member
Hi,



I am wondering if it would be possible to populate the subject title of an e-mail with data that has been entered into a form text field.



For example,



1. User enters data into Description field.

2. User clicks the Submit by E-mail button.

3. E-mail subject title is automatically populated with the data entered in the Description field.



If this is possible, I would appreciate any help (scripting advice, etc.)



Many thanks in advance,

Sharon.
6 Replies

Avatar

Former Community Member
Hi Jimmy,

Thanks for that, the requirement has since changed though, it is now:



1. Form contains a customer name and date field

2. User enters data and selects date field

3. User clicks the Submit by E-mail button

2. The e-mail subject is automatically populated with the customer name and the current date



What we are trying to achieve is some way to filter the forms returned. Would it be possible to include these options either through the mailto function or script?



Many thanks.

Avatar

Former Community Member
This code will do what you want if placed in the clickevent of a button.



event.target.mailDoc(true,"rruiz@Novanis.com","","",RegistrationInfo.Page1.Company.ComapnyInfo.ComapnyName.rawValue + " - " + RegistrationInfo.Page1.ClassInfo.TrainingClassTitle.rawValue ,"Please provide any additional special request here.");



Rich Ruiz

Novanis

Avatar

Former Community Member
Hi,



Many thanks for that - but unfortunately the code doesn't seem to work - should it be used for a click event for a button - or is it scripting for the text field and date field.....?



Thanks,

Sharon.

Avatar

Former Community Member
Sharon,



Make sure to change the references to the form fields RegistrationInfo.Page1.Company.ComapnyInfo.ComapnyName.rawValue

and RegistrationInfo.Page1.ClassInfo.TrainingClassTitle.rawValue in the example accordingly. This will depend on your form hierrachy.

Avatar

Former Community Member
I use it in the click event of a button. Make sure your object reference is correct This is probably the trickiest part of Designer scripting.



Rich Ruiz