Setting a boolean value to Yes/No for subscription management confirmation | Community
Skip to main content
March 8, 2017
Question

Setting a boolean value to Yes/No for subscription management confirmation

  • March 8, 2017
  • 1 reply
  • 3930 views

Hi. We would like to be able to put a Yes/No next to each preference center option when it is presented in the Confirmation landing page. I've tried the script below without success.  Anyone have any suggestions?  Thanks in advance.

#if (${lead.pCMarketingCommunications} == 1 )

#set ($pcMarketingCommunications = "Yes,")

#if (${lead.pCMarketingCommunications} == 0 )

#set ($pcMarketingCommunications = "No,")

#END

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

1 reply

SanfordWhiteman
Level 10
March 8, 2017

Sarah, you can't use VTL (Velocity Template Languagee) on LPs. Velocity is for email personalization.  On LPs, you use JavaScript. But it's not clear why you'd need any kind of scripting for this, since Marketo forms natively handle booleans.

March 8, 2017

The native boolean capability is working great.  But for the confirmation landing page, I was hoping to put something more friendly than the 1 or 0 you get if you just use the token.  Below is the mock up (please pardon the ugliness its a non styled test). Going to look into using javascript. Thanks!

Josh_Hill13
Level 10
March 8, 2017

Yes, that use case requires javascript/jquery to convert that to a human language.