Re: Hidden elements will not show even after forwarding the email

Jasbir_Kaur
Level 5

Hidden elements will not show even after forwarding the email

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

7 REPLIES 7
Sandeepkumar2
Level 2

Re: Hidden elements will not show even after forwarding the email

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.

Jasbir_Kaur
Level 5

Re: Hidden elements will not show even after forwarding the email

You can create it editable as well.

SanfordWhiteman
Level 10 - Community Moderator

Re: Hidden elements will not show even after forwarding the email

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.

SanfordWhiteman
Level 10 - Community Moderator

Re: Hidden elements will not show even after forwarding the email


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.

Jasbir_Kaur
Level 5

Re: Hidden elements will not show even after forwarding the email

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
Level 10 - Community Moderator

Re: Hidden elements will not show even after forwarding the email

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

 

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

Jasbir_Kaur
Level 5

Re: Hidden elements will not show even after forwarding the email

I agree @SanfordWhiteman, velocity is the great option, however who are not comfortable with the velocity they can use this approach.