Page 1 of 1
Frontend User username sent through Form Builder
Posted: Sat Jun 23, 2007 1:51 pm
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.
Re: Frontend User username sent through Form Builder
Posted: Sat Jun 23, 2007 2:40 pm
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}
Re: Frontend User username sent through Form Builder
Posted: Sat Jun 23, 2007 3:53 pm
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.
Re: Frontend User username sent through Form Builder
Posted: Sat Jun 23, 2007 4:26 pm
by calguy1000
the above code would go in your page content or page template to replace where you call formbuilder.
Re: Frontend User username sent through Form Builder
Posted: Sat Jun 23, 2007 4:38 pm
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.
Re: Frontend User username sent through Form Builder
Posted: Thu Oct 25, 2007 5:24 pm
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