Page 1 of 1

Formbuilder templating [solved]

Posted: Sat Nov 15, 2014 1:21 pm
by HarmO
Hy,

For my form, i would like my FB template, to use a personalized textaera tag.

why? for a script i want to add "data-equalizer-watch" ad the end of the tag.

FB generates:

Code: Select all

<textarea name="cntnt01fbrp__39" cols="80" rows="5" class="cms_textarea" id="fbrp__39" placeholder=""></textarea>
i replaced this with

Code: Select all

<textarea name="cntnt01{$bericht->input_id}" cols="80" rows="5" class="cms_textarea" id="{$bericht->input_id}" placeholder="{$bericht->name}{if $bericht->required} {$bericht->required_symbol}{/if}" data-equalizer-watch>{$bericht->input|strip_tags:false}</textarea>
Is this the best way? or is there an easier way?
Also, how can i retrieve the name="cntnt01fbrp__39" from $bericht->input?
because now, I'm guessing that it starts with "cntnt01" but i belief this will not always be the case.

Re: Formbuilder templating

Posted: Sat Nov 15, 2014 1:46 pm
by Jo Morg
IIRC replace cntnt01 with {$actionid} and it should work.

Re: Formbuilder templating

Posted: Sat Nov 15, 2014 3:29 pm
by HarmO
Thanks Jo Morg,

that does the trick

Re: Formbuilder templating [solved]

Posted: Tue Nov 25, 2014 9:19 am
by HarmO
final template:

Code: Select all

<textarea name="{$actionid}{$bericht->input_id}" cols="80" rows="5" class="cms_textarea" id="{$bericht->input_id}" placeholder="{$bericht->name}{if $bericht->required} {$bericht->required_symbol}{/if}" data-equalizer-watch>{$bericht->input|strip_tags:false}</textarea>