Marketo and Unbounce - possible to combine fields in Marketo? | Community
Skip to main content
Erik_Hill1
New Participant
August 19, 2019
Solved

Marketo and Unbounce - possible to combine fields in Marketo?

  • August 19, 2019
  • 1 reply
  • 4573 views

Hello,

We're currently using Marketo with Unbounce landing pages. We need to combine last name, last 4 of the phone number, and the word 'Household' to populate the company field in Marketo, if possible.

Example Company field format in Marketo: Smith7890 Household

Is it possible to concatenate a full field (last name), capitalize the first letter and lowercase the rest, if needed, add the last 4 numbers of the phone, add a space, then add the word 'Household', all inside Marketo? Or is this something that needs to be done/can be done on the page via JS before sending the data to Marketo?

Sanford Whiteman, is this something you're familiar with?

Best answer by SanfordWhiteman
<script>
document.forms[0].addEventListener("submit", function(e){
this.Company__c.value =
this.LastName.value.substr(0,1).toLocaleUpperCase() +
this.LastName.value.substr(1).toLocaleLowerCase() +
this.Phone.value.substr(-4) +
" Household";
});
</script>

Add this to Unbounce as a "Before Body End Tag" script.

1 reply

SanfordWhiteman
New Participant
August 19, 2019

Sure, it could be done within the Unbounce form. (Standard DOM input value for a hidden field in this case, as it's not a Marketo form.)  Add the field to the form as hidden and post a link to your page.

Erik_Hill1
New Participant
August 22, 2019

Ty @Sanford Whiteman‌! Are you saying to post a link to the page here in this thread? If so, would you mind if I messaged you the link directly?

SanfordWhiteman
New Participant
August 22, 2019

Yeah, you can message me.