Frontend User username sent through Form Builder

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
User avatar
snatrott
Forum Members
Forum Members
Posts: 26
Joined: Tue Mar 13, 2007 7:10 pm

Frontend User username sent through Form Builder

Post by snatrott »

I am working on a project where users log in to certain pages of a site and take a test which is then emailed to me. I have everything working perfectly with Frontend Users, CustomContent and Form Builder. However, I need to know which user (from FEU) submitted the form. I cannot figure out how to put the username in the submission email when they complete the form.

Any help is greatly appreciated.

Thanks.
Websites at NINJA Speed!
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: Frontend User username sent through Form Builder

Post by calguy1000 »

You can create a hidden field in formbuilder, and supply a value to it on the formbuilder tag.  The value can be a smarty variable (assuming you're using 0.3 of formbuilder).  You'll have to either have the FrontEndUsers information displayed earlier, or export the frontenduser information to smarty silently.

i.e:
{cms_module module='FrontEndUsers'}{cms_module module=FormBuilder value_myhiddenfield=$username}
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.
User avatar
snatrott
Forum Members
Forum Members
Posts: 26
Joined: Tue Mar 13, 2007 7:10 pm

Re: Frontend User username sent through Form Builder

Post by snatrott »

Just for clarification (because I am not really that knowledgeable on smarty tage), do I post:
{cms_module module='FrontEndUsers'}{cms_module module=FormBuilder value_myhiddenfield=$username}
as the value in my hidden field? I gave that a shot, but it only messed up part of my form. I am not sure where exactly I should put the code you gave me if it doesn't go in the hidden field value.

I thought about creating a user defined tag, but I really don't know how to do that.

Again, I really appreciate your help and patience.

Thanks.
Websites at NINJA Speed!
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: Frontend User username sent through Form Builder

Post by calguy1000 »

the above code would go in your page content or page template to replace where you call formbuilder.
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.
User avatar
snatrott
Forum Members
Forum Members
Posts: 26
Joined: Tue Mar 13, 2007 7:10 pm

Re: Frontend User username sent through Form Builder

Post by snatrott »

Ok, I added the value_myhiddenfield=$username to my Form Builder call. I named my hidden field "myhiddenfield" and left the value box blank. I also enable the process Smarty tags box for the hidden field. However, when I submit the form, The field for the hidden field says Array instead of the username.

I am not sure if and what I am doing wrong.

Thanks.
Websites at NINJA Speed!
mdmdesign
Forum Members
Forum Members
Posts: 12
Joined: Wed Oct 17, 2007 1:34 pm

Re: Frontend User username sent through Form Builder

Post by mdmdesign »

I am having the same problem and can't do it. In a custom content page I will have a formbuilder form where the frontend user properties should be displayed as static-text and then be should be sent together with the rest of results of the form to me.

Should be possible, bur I smarty tags wont work properly, neither in static-texr nor in hiden field.

Please help me out
Post Reply

Return to “CMSMS Core”