Formbuilder templating [solved]

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
HarmO
Power Poster
Power Poster
Posts: 251
Joined: Thu Jan 26, 2012 3:22 pm

Formbuilder templating [solved]

Post 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.
Last edited by HarmO on Sat Nov 15, 2014 3:31 pm, edited 1 time in total.
Kind regards,
HarmO
User avatar
Jo Morg
Dev Team Member
Dev Team Member
Posts: 1974
Joined: Mon Jan 29, 2007 4:47 pm

Re: Formbuilder templating

Post by Jo Morg »

IIRC replace cntnt01 with {$actionid} and it should work.
"There are 10 types of people in this world, those who understand binary... and those who don't."
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
HarmO
Power Poster
Power Poster
Posts: 251
Joined: Thu Jan 26, 2012 3:22 pm

Re: Formbuilder templating

Post by HarmO »

Thanks Jo Morg,

that does the trick
Kind regards,
HarmO
HarmO
Power Poster
Power Poster
Posts: 251
Joined: Thu Jan 26, 2012 3:22 pm

Re: Formbuilder templating [solved]

Post 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>
Kind regards,
HarmO
Post Reply

Return to “Modules/Add-Ons”