Page 1 of 1
Passing FEU variables to FormBuilder?
Posted: Fri Dec 14, 2007 10:55 pm
by geepers
Does anyone know how to pass variables from FrontEndUser to FormBuilder fields/values?
What I'd like to do is automatically load the username/email of a logged in user into hidden fields within FormBuilder.
Any help/suggestions would be greatly appreciated.
Cheers!
Re: Passing FEU variables to FormBuilder?
Posted: Fri Dec 14, 2007 11:00 pm
by calguy1000
it's documented within the forbuilder help (if I recall correctly).... how to pass values into formbuilder.
Now you just need to know the smarty variables..... you'll need CustomContent installed, and try doing a {get_template_vars).
Re: Passing FEU variables to FormBuilder?
Posted: Fri Dec 14, 2007 11:19 pm
by geepers
my vision may be failing... however, i can't seem to locate the 'pass values into formbuilder' info within formbuilder help.
hadn't utilized the {get_template_vars} before - good idea
Re: Passing FEU variables to FormBuilder?
Posted: Sun Dec 16, 2007 5:39 am
by geepers
Okay - vision is restored - thanks Calguy
The heading that this falls under in FormBuilders help page is "Passing Default Values to Forms". Seems kinda obvious don't it! *doh*
The important bit is that it works like a charm.
Cheers!
Re: Passing FEU variables to FormBuilder?
Posted: Mon Dec 17, 2007 4:17 am
by geepers
Further to the previous posts on this thread, is there a trick to getting the passed values handled properly when submitted.
Presently I get the following error:
Warning: htmlspecialchars() expects parameter 1 to be string, array given in /home/greg/tigernotes.ca/html/cms/modules/FormBuilder/action.default.php on line 120
The values in question do show in the source code of the form itself. I've tried using both the fld_## value and the fieldname. Both yield the same result.
Re: Passing FEU variables to FormBuilder?
Posted: Sat Feb 09, 2008 5:19 am
by tosd
Yes, I have exactly the same problem, so if anyone can help there will be at least two very happy peopleĀ
