Customize form.NotYou | Community
Skip to main content
Aslihan_Ayan_Ha
Level 6
February 12, 2016
Solved

Customize form.NotYou

  • February 12, 2016
  • 1 reply
  • 2819 views

Under form, when the user is known, we would like the custom HTML to include lead first name in the link. Like {{form.NotYou:default=Not {{lead.FirstName}}? Click here}}. Since this is token inside token, I am not able to do this. Is there a workaround for this?

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

Here's your Known Lead HTML:

<div>Welcome back, <span id="FirstName">{{lead.FirstName}}</span> {{lead.LastName}}<br /><br />{{form.Button:default=Download}}<br /><br />{{form.NotYou:default=Not you?}}</div>

<script>

document.querySelector('A.mktoNotYou').innerHTML='Not ' + document.querySelector('#FirstName').innerHTML + '?';

</script>

1 reply

SanfordWhiteman
Level 10
February 12, 2016

Easy, just change the value on the button.  You'll already have the {{lead.FirstName}} value available elsewhere in the DOM.

Aslihan_Ayan_Ha
Level 6
February 12, 2016

@Sanford Whiteman​

I am sure if I am following you when you say change the button. I want the "Not you? Click here"  to say "Not Ashley? Click here". Which button do i change?

Grégoire_Miche2
Level 10
February 12, 2016

Hi Ashley,

It will take a little JS to pick the first name and replace the "Not You"

-Greg