[SOLVED] - HTML showing up in form Browser

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
sagedel
Forum Members
Forum Members
Posts: 20
Joined: Fri Aug 24, 2007 3:50 pm

[SOLVED] - HTML showing up in form Browser

Post by sagedel »

Hi everyone,

I'm not sure if there is a setting for this that I am missing, or how to fix it.

I have a form set up in form builder that contains three text area fields, each of which allows the front end user to input text via tinymce wysiwyg. Once the form is submitted, it goes into the database, where I then have form browser set up to show the entries on the front end to all users of the website.

The problem is, when the browser displays the text from the wysiwyg fields, it actually prints the html tags on the page instead of using them.

Any idea on what I can do to fix this? It took me forever to get TinyMCE to work for front end users due to some bugs, so I'd really be bummed if after all that I have to take it out because its displaying the HTML.

Any help would be much appreciated.

Thanks!
Last edited by sagedel on Wed Dec 24, 2008 5:02 pm, edited 1 time in total.
sagedel
Forum Members
Forum Members
Posts: 20
Joined: Fri Aug 24, 2007 3:50 pm

Re: HTML showing up in form Browser

Post by sagedel »

After fiddling with it some more, I don't think its Tiny because I turned off the WYSIWYG and just typed in some code and submitted.

It looks like form builder is converting the < into < on submission to the database.

Any way to fix this so that it submits the text that is actually in the box?
sagedel
Forum Members
Forum Members
Posts: 20
Joined: Fri Aug 24, 2007 3:50 pm

Re: HTML showing up in form Browser

Post by sagedel »

Ok.. more fiddling...

I logged into my actual database through PMA... the correct HTML tags are being entered into the database properly... i.e. instead of <p<

My guess now is that its form builder doing something with the info it pulls from the database??
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: HTML showing up in form Browser

Post by calguy1000 »

try using {$whatever|html_entity_decode}  in your formbrowser template.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
sagedel
Forum Members
Forum Members
Posts: 20
Joined: Fri Aug 24, 2007 3:50 pm

Re: HTML showing up in form Browser

Post by sagedel »

Here's my template:

Code: Select all

<p class="heading">{section name=foo start=0 loop=$count max=1}
		  {$resp->values[$smarty.section.foo.index]|escape}
		{/section}</p>
<span class="albumpicturecount2">Submitted by: {section name=foo start=6 loop=$count max=1}
		  {$resp->values[$smarty.section.foo.index]|escape}
		{/section}</span>
{if $message!=''}<p>{$message}</p>{/if}
<p><img src="{section name=foo start=1 loop=$count max=1}
		  {$resp->values[$smarty.section.foo.index]|escape}
		{/section}" width="500"></p>
{if $resp->values[$smarty.section.foo.index]|escape!=''}<p><b>Description:</b></p>
<p>{section name=foo start=2 loop=$count max=1}
		  {$resp->values[$smarty.section.foo.index]|escape}
		{/section}</p>{/if}
{if $resp->values[$smarty.section.foo.index]|escape!=''}<p><b>Cartridges Used:</b></p>
<p>{section name=foo start=3 loop=$count max=1}
		  {$resp->values[$smarty.section.foo.index]|escape}
		{/section}</p>{/if}
{if $resp->values[$smarty.section.foo.index]|escape!=''}<p><b>Instructions:</b></p>
<p>{section name=foo start=4 loop=$count max=1}
		  {$resp->values[$smarty.section.foo.index]|escape}
		{/section}</p>{/if}
Where should I put that? My knowledge of smarty and PHP does not extend much past page 2 of the manual.
sagedel
Forum Members
Forum Members
Posts: 20
Joined: Fri Aug 24, 2007 3:50 pm

Re: HTML showing up in form Browser

Post by sagedel »

YAY! Nevermind, I got it...

I changed escape to html_entity_decode and it worked :)

Thanks so much Calguy!!!
Post Reply

Return to “Modules/Add-Ons”