Passing FEU variables to FormBuilder?

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
geepers
Dev Team Member
Dev Team Member
Posts: 84
Joined: Thu Nov 22, 2007 10:41 pm

Passing FEU variables to FormBuilder?

Post 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!
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: Passing FEU variables to FormBuilder?

Post 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).
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.
geepers
Dev Team Member
Dev Team Member
Posts: 84
Joined: Thu Nov 22, 2007 10:41 pm

Re: Passing FEU variables to FormBuilder?

Post 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
geepers
Dev Team Member
Dev Team Member
Posts: 84
Joined: Thu Nov 22, 2007 10:41 pm

Re: Passing FEU variables to FormBuilder?

Post 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!
geepers
Dev Team Member
Dev Team Member
Posts: 84
Joined: Thu Nov 22, 2007 10:41 pm

Re: Passing FEU variables to FormBuilder?

Post 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.
tosd
Forum Members
Forum Members
Posts: 52
Joined: Thu Jan 11, 2007 1:02 am

Re: Passing FEU variables to FormBuilder?

Post by tosd »

Yes, I have exactly the same problem, so if anyone can help there will be at least two very happy people  ;D
Post Reply

Return to “CMSMS Core”