This is driving me a bit crazy....
Am using Form Builder to create a form (logically), and I want the form (that is sent to the site administrator) to have a reference to the page (and/or contents of the page) that the user sends the form from.
This would 'appear' to be possible using the 'Hidden' field in Form Builder - which allows smarty's to be processed.
I hence input the smarty value - typically {$title} - which shows up nicely in the body of the page - but when the Form Builder part is processed it gives this error:
string(127) "Smarty error: [in evaluated template line 1]: syntax error: unrecognized tag: $title (Smarty_Compiler.class.php, line 446)" string(117) "Smarty error: [in evaluated template line 1]: syntax error: unrecognized tag '' (Smarty_Compiler.class.php, line 590)"
Implying I have the incorrect syntax. ('Process smarty tags within field' is selected)
So how should it be done????
Or how else can something similar be achieved - ideally using Form Builder which has the functionality I'm looking for.
Hope someone knows the answer...
What is the correct syntax to use smart tags in Form Builder 'hidden' field?
-
- Support Guru
- Posts: 8169
- Joined: Tue Oct 19, 2004 6:44 pm
- Location: Fernie British Columbia, Canada
Re: What is the correct syntax to use smart tags in Form Builder 'hidden' field?
You don't supply information as to your call to form builder....
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.
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.
Re: What is the correct syntax to use smart tags in Form Builder 'hidden' field?
Called using: {cms_module module='FormBuilder' form='sample_form'}
'sample_form' has then been modified to have this hidden field with smarty.
Does that help?
'sample_form' has then been modified to have this hidden field with smarty.
Does that help?
Re: What is the correct syntax to use smart tags in Form Builder 'hidden' field?
If you use the {title} tag instead of using {$title} it should work.
However I couldn't get it to work with {$customcontent_loginname} (I got the same "unrecognized tag" error message)
Got the required result by :
- creating a hidden value
- leave the value field empty
- in the tag calling the form I gave a default value to the hidden field (this is in the help file)
for example : {cms_module module='FormBuilder' form='my_form' value_fld29=$customcontent_loginname}
or : {cms_module module='FormBuilder' form='my_form' value_my_hidden_field=$customcontent_loginname}
IMPORTANT It says in the help file that inline display is not supported so you must not select 'Display form inline?'
For example : with a Store Results in Database field in the form, inline display selected and a default value in the call to Form Builder there is the following error:
Warning: htmlspecialchars() expects parameter 1 to be string, array given in
..../modules/FormBuilder/action.default.php on line 120
However I couldn't get it to work with {$customcontent_loginname} (I got the same "unrecognized tag" error message)
Got the required result by :
- creating a hidden value
- leave the value field empty
- in the tag calling the form I gave a default value to the hidden field (this is in the help file)
for example : {cms_module module='FormBuilder' form='my_form' value_fld29=$customcontent_loginname}
or : {cms_module module='FormBuilder' form='my_form' value_my_hidden_field=$customcontent_loginname}
IMPORTANT It says in the help file that inline display is not supported so you must not select 'Display form inline?'
For example : with a Store Results in Database field in the form, inline display selected and a default value in the call to Form Builder there is the following error:
Warning: htmlspecialchars() expects parameter 1 to be string, array given in
..../modules/FormBuilder/action.default.php on line 120
Re: What is the correct syntax to use smart tags in Form Builder 'hidden' field?
Did anybody get so solve this issue? I am getting the same... the return value (received result as email) i get "Array" for the hidden field.