HTML won't render in Landing Page | Community
Skip to main content
April 22, 2016
Solved

HTML won't render in Landing Page

  • April 22, 2016
  • 1 reply
  • 2406 views

Hi all:

I am returning some html from a third party source and storing it in a field.  When I call it in the form of a token from an email it looks fine.  But when I do the same from a Landing page it just shows the text of the HTML, am I doing something wrong with the landing pages?  The html actually calls a google api to create a chart based on the users data.

Here is the HTML I am using.  Again it works in the email editor just fine.

<table border="1">

<tbody>

<tr>

<td><img title="my test" src="https://chart.googleapis.com/chart?chs=350x263&amp;chxt=x,y,y&amp;chxl=0:|Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sept|Oct|Nov|Dec|2:|kWh&amp;chxp=2,50&amp;chxr=1,1000,1800&amp;chd=t6:-1|68,55,63,70,62,66,57,59,56,68,70,81|-1|48,45,43,40,42,46,47,49,46,48,50,51|-1|38,34,32,29,32,34,36,36,32,36,38,39&amp;cht=lxy&amp;chco=000000,f5f6ce,d0f5a9&amp;chf=c,lg,0,81daf5,0,76A4FB,1&amp;chm=o,000000,0,-1,8|o,F5f6ce,1,-1,8|o,d0f5a9,2,-1,8&amp;chg=100,25&amp;chls=3|3,6,3|3,6,3&amp;chma=20,20,20,30|80,20&amp;chdl=You|Your_Neighbors|Efficient_Neighbors&amp;chdlp=b&amp;chtt=Electricity+-+44%+more+than+your+neighbors" alt="" height="263" width="350" /></td>

<td><img title="my test2" src="https://chart.googleapis.com/chart?chs=350x263&amp;chxt=x,y,y&amp;chxl=0:|Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sept|Oct|Nov|Dec|2:|Therms&amp;chxp=2,50&amp;chxr=1,1000,1800&amp;chd=t6:-1|44,41,38,50,52,54,55,56,54,57,59,60|-1|48,45,43,40,42,46,47,49,46,48,50,51|-1|38,34,32,29,32,34,36,36,32,36,38,39&amp;cht=lxy&amp;chco=000000,f5f6ce,d0f5a9&amp;chf=c,lg,0,81daf5,0,76A4FB,1&amp;chm=o,000000,0,-1,8|o,F5f6ce,1,-1,8|o,d0f5a9,2,-1,8&amp;chg=100,25&amp;chls=3|3,6,3|3,6,3&amp;chma=20,20,20,30|80,20&amp;chdl=You|Your_Neighbors|Efficient_Neighbors&amp;chdlp=b&amp;chtt=Natural+Gas+-+12%+more+than+your+neighbors" alt="" height="263" width="350" /></td>

</tr>

</tbody>

</table>

<p><br /></p>

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 Grégoire_Miche2

Hi Jamie,

Are you using a Guided or a Free Form LP?

In a guided, there is no HTML component. You need to edit a text area, then switch to the HTML mode in the editor and paste the HTML there.

In a freeform, you can drop an HTML widget and paste the code directly.

-Greg

1 reply

Grégoire_Miche2
Grégoire_Miche2Accepted solution
New Participant
April 22, 2016

Hi Jamie,

Are you using a Guided or a Free Form LP?

In a guided, there is no HTML component. You need to edit a text area, then switch to the HTML mode in the editor and paste the HTML there.

In a freeform, you can drop an HTML widget and paste the code directly.

-Greg

April 25, 2016

Hi:

I tried this but I need it to be stored as a field in the database and referred to by a token, it does not seem to work when I refer to the code within a token.  Any ideas as to why or a workaround?

Grégoire_Miche2
New Participant
April 25, 2016

HI Jamie,

I am not sure I am following your there. Do you mean the whole HTML table code is in a field?

If this is the case, I gather that the 2 images are variable depending on the lead?

If so, I would store the image URLs in 2 fields and have a code like this in the LP:

<table border="1">

<tbody>

<tr>

<td><img title="my test" src="{{lead.field1}}" alt="" height="263" width="350" /></td>

<td><img title="my test2" src="{{lead.field2}}" alt="" height="263" width="350" /></td>

</tr>

</tbody>

</table>

<p><br /></p>

-Greg