Hidden elements will not show even after forwarding the email | Community
Skip to main content
New Participant
June 26, 2023
Question

Hidden elements will not show even after forwarding the email

  • June 26, 2023
  • 2 replies
  • 2353 views

Hi Everyone,

 

One common challenge we face with show/hide functionality in Marketo Emails is the reappearing of hidden elements when the email is forwarded. However, by implementing the following code, you can successfully overcome this issue and ensure consistent behavior.

 

Here is the code for the CTA -

<meta mktoModuleScope="true" class="mktoBoolean" id="show2ColRightCTA" mktoName="Show CTA Right?" default="true" true_value="-->" false_value="" true_value_name="YES" false_value_name="NO"> ---------------------------------------------------------------------------------------- <tr> <td valign="top" align="center"> <table border="0" cellspacing="0" cellpadding="0" align="left" class="em_wrapper"> <!-- Section Conditional Trigger ${show2ColRightCTA} <tr> <td valign="top" align="left"> <table border="0" cellspacing="0" cellpadding="0" align="center"> <tr> <td height="${Col2RightCTATopspace}" style="height:${Col2RightCTATopspace}px; font-size:1px; line-height:1px;">&nbsp;</td> </tr> <tr> <td align="center" valign="top"> <table bgcolor="${col2CTARight_BGcolor}" align="left" border="0" cellspacing="0" cellpadding="0" style="background-color:${col2CTARight_BGcolor};"> <tr> <td align="center" valign="middle" height="38" style="min-width:100px; text-align: center; height:38px; color:${col2CTARight_Textcolor}; font-size:14px; font-family: 'Red Hat Display', Arial, sans-serif; font-weight:bold; padding:0px 12px;"> <a href="${col2CTARight_LinkURL}" target="_blank" style="text-decoration:none; display:block; color:${col2CTARight_Textcolor};"><font face="'Red Hat Display', Arial, sans-serif" class="outlookfont">${col2CTARight_Text}</font></a> </td> </tr> </table> </td> </tr> <tr> <td height="${Col2RightCTABotspace}" style="height:${Col2RightCTABotspace}px; font-size:1px; line-height:1px;">&nbsp;</td> </tr> </table> </td> </tr> <!-- End Conditional --> </table> </td> </tr>

 

Let me know in case of any concerns.

 

Thanks!

Jasbir

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

2 replies

SanfordWhiteman
New Participant
June 26, 2023

Let me know in case of any concerns.

You’re now sending invalid HTML when the value is false. This is never recommended.

 

By far the better way to do this is to use Velocity to truly remove the element before sending. That way there’ll be a zero percent chance of any hidden content being revealed.

JasbirkaAuthor
New Participant
June 28, 2023

We can use in this way as well - 

 

<meta mktoModuleScope="true" class="mktoBoolean" id="show2ColRightCTA" mktoName="Show CTA Right?" default="true" true_value="-->" false_value="none" true_value_name="YES" false_value_name="NO">

 

SanfordWhiteman
New Participant
June 28, 2023

This doesn’t solve the problem — it’s still invalid HTML.

 

You can’t have an open comment sequence inside a comment.

New Participant
June 26, 2023

That's a good approach but in that way the element is no more editable, you can't edit the element by clicking on it in the edit mode.
The only option left is to use variable to update the values.

JasbirkaAuthor
New Participant
June 28, 2023

You can create it editable as well.

SanfordWhiteman
New Participant
June 28, 2023

Not sure what you mean. I’m saying in your approach, you send invalid HTML in order to get the effect of a commented-out section. Your comment structure will not validate. This doesn’t mean mail clients will throw an error (they’re used to people sending bad HTML and are loose when rendering) but it’s not something we should be recommending.