[solved] Passing Variables from Frontend Users to UDTs

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
turch2009
Forum Members
Forum Members
Posts: 40
Joined: Wed Oct 21, 2009 1:19 am

[solved] Passing Variables from Frontend Users to UDTs

Post by turch2009 »

I need to retrieve the $email variable from Frontend Users for a UDT.  UDT's don't seem to like the Smarty Functions given in the FUE module help page, but I'm not very well-versed as to how to use these.  Can soomeone please show me what I should put in the UDT to grab the variable?
Last edited by turch2009 on Wed Feb 17, 2010 11:35 pm, edited 1 time in total.
jmcgin51
Power Poster
Power Poster
Posts: 1899
Joined: Mon Jun 12, 2006 9:02 pm

Re: Passing Variables from Frontend Users to UDTs

Post by jmcgin51 »

what does your UDT look like right now?

To pull the variable from FEU, the UDT will need to have something like this:

global $gCms;
$email = $gCms->smarty->get_template_vars('feu_email');  //or whatever the actual feu email property name is
turch2009
Forum Members
Forum Members
Posts: 40
Joined: Wed Oct 21, 2009 1:19 am

Re: Passing Variables from Frontend Users to UDTs

Post by turch2009 »

ok, so this is the UDT I put in not making a change to your addition:

global $gCms;
$email = $gCms->smarty->get_template_vars('feu_email');

mail('$email','Application Approved','Your Application has been approved.');

I know that $email is the FEU variable used to get the user's email.  I'm not sure how to put that here.  This currently doesn't work.  If I replace "$email" with my email, it does mail when it's supposed to, so I know I have it set up in the Events manager correctly.
jmcgin51
Power Poster
Power Poster
Posts: 1899
Joined: Mon Jun 12, 2006 9:02 pm

Re:Passing Variables from Frontend Users to UDTs

Post by jmcgin51 »

is "feu_email" the actual name of the email field in FEU?  Check {get_template_vars}.
Last edited by Anonymous on Wed Feb 17, 2010 5:28 pm, edited 1 time in total.
turch2009
Forum Members
Forum Members
Posts: 40
Joined: Wed Oct 21, 2009 1:19 am

Re: Passing Variables from Frontend Users to UDTs

Post by turch2009 »

The email field in FEU is $email
Last edited by Anonymous on Wed Feb 17, 2010 5:28 pm, edited 1 time in total.
jmcgin51
Power Poster
Power Poster
Posts: 1899
Joined: Mon Jun 12, 2006 9:02 pm

Re: Passing Variables from Frontend Users to UDTs

Post by jmcgin51 »

then you need to change your UDT

try
global $gCms;
$email = $gCms->smarty->get_template_vars('email');

mail('$email','Application Approved','Your Application has been approved.');
Last edited by Anonymous on Wed Feb 17, 2010 5:28 pm, edited 1 time in total.
turch2009
Forum Members
Forum Members
Posts: 40
Joined: Wed Oct 21, 2009 1:19 am

Re: Passing Variables from Frontend Users to UDTs

Post by turch2009 »

That didn't work unfortunately.  I then tried this:

global $gCms;
$email = $gCms->smarty->get_template_vars('email');

mail('myemail@yahoo.com','Application Approved','Your Application has been approved $email.');


I got the email and it said "Your Application has been approved $email."  I expected it to show the variable but I guess not.

Any other ideas?
turch2009
Forum Members
Forum Members
Posts: 40
Joined: Wed Oct 21, 2009 1:19 am

Re: Passing Variables from Frontend Users to UDTs

Post by turch2009 »

Ok, I got the solution through working out with a friend.  Here it is and it works for anyone else trying to do this:

$extravar = $_REQUEST["m1_input_email"];

mail($extravar,'Profile Updated','Your profile has been updated');


Thanks for everyone's help!
Post Reply

Return to “Modules/Add-Ons”