Quantcast
Channel: Topliners: Message List
Viewing all articles
Browse latest Browse all 3431

Re: How do you edit Subject in Notification Emails to include Lead Name?

$
0
0

Kateri, I'm happy to help!

 

You will need to add a new field to your contact table. Let's call it FormDataField. We will use the contents of that field to populate the subject line. The Cloud Connector I had in mind will not work but JavaScript will do the job.

 

Form

Setup a form and add a few fields to it, including:

First Name, Last Name, Email Address, and one hidden field (in the far left of the screen, select "custom fields" and then choose "Hidden Field"

 

Now, for the hidden field you need configure it a bit:

On the far right, under the advanced section for field settings, set the html name to: ConcatenatedData

 

Processing Steps

Add two steps: "Update contacts with form data" and "Send notification email"

Under "update contact with form data" step, set the target field to the new contact field you created, FormDataField

Under the "Send notification email" step, enter the email address you wan the notification email to go to. And for "Choose how the subject of the email is selected" choose "Use the value of the form field to select the subject." For this setting, select the Hidden Field.

 

Be sure to do the Key Mapping at the bottom left of the page, as per usual for any form.

 

Landing Page

Now, for the magic to happen you need to use a little bit of Javascript.

Create a new landing page add this new form you just built.

Go to the Tool Box in the Awesome Eloqua editor for the landing page. On the very last tab of the Tool Box dialog you should see "Open JS Editor..." at the bottom. Select that. In the popup code box, drop in the JavaScript from the bottom of this response. Hit "save" on the code dialog popup. Now hit save on the Landing Page.

 

You should now be ready to test things out. Please let me know if you have any trouble.

 

Notes

  • I assume the HTML name of the first name and last name fields is firstName andlastName respectively. If not, update as necessary.
  • In the code below you can replace this text with whatever you like, but try to avoid add characters and quotation marks: THIS_IS_TEXT_YOU_CAN_CUSTOMIZE
  • I'm sure there is a simpler way to get the hidden field to populate but I this should work.

 

JavaScript:

<script src="https://code.jquery.com/jquery-1.10.1.min.js"></script>

<script>

$(function(){

  ConcatenateYourData();

  $("input").blur(function(){

    ConcatenateYourData();

  });

});

function ConcatenateYourData(){

  var completeString=$("[name='firstName']").val() + " THIS_IS_TEXT_YOU_CAN_CUSTOMIZE " + $("[name='lastName']").val();

  $("[name='ConcatenatedData']").val(completeString);

};

</script>


Viewing all articles
Browse latest Browse all 3431

Trending Articles