Parsing HTML in an SAEF (quotes especially) in an input field
Posted: 29 April 2008 12:24 PM   [ Ignore ]
Newbie
Rank
Total Posts:  30
Joined  2006-07-16

Hey Mitchell and Pie Man,

Thanks for your help with the File Upload. I have a quick question regarding Form Helper when it comes to a field where HTML has been entered. Right now, I’m setting up a blog for someone who needs to be able to paste video EMBED links from YouTube into a special field.

However, when you go to make these appear with Form Helper, the quotes in the HTML break the input field. Is there a way for Form Helper to convert quotes to character entities in the “value” attribute of the input field?

So right now, for example I have:

<span class="formcaption">Video Link 1:</span>
<
input type="text" class="input" name="{exp:form_helper:field_grabber field_name='blog_videolink1' which='name'}" value="{blog_videolink1}" size="40" onclick="setFieldName(this.name)" />
<
input type="hidden" name="{exp:form_helper:field_grabber field_name='blog_videolink1' which='format'}" value="none" />

I realize that there’s a field parser but it seems to only strip out, not replace:

{exp:form_helper:field_parser parse="<br />"}{/exp:form_helper:field_parser}

Thanks!

R o B

Profile
 
 
Posted: 30 April 2008 07:07 AM   [ Ignore ]   [ # 1 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  2692
Joined  2006-10-18

Rob,

Have you tried this as a Text Area? smile

It seems to work that way wink

 Signature 
Profile