[solved] Passing Variables from Frontend Users to UDTs
[solved] Passing Variables from Frontend Users to UDTs
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.
Re: Passing Variables from Frontend Users to UDTs
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
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
Re: Passing Variables from Frontend Users to UDTs
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.
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.
Re:Passing Variables from Frontend Users to UDTs
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.
Re: Passing Variables from Frontend Users to UDTs
The email field in FEU is $email
Last edited by Anonymous on Wed Feb 17, 2010 5:28 pm, edited 1 time in total.
Re: Passing Variables from Frontend Users to UDTs
then you need to change your UDT
try
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.
Re: Passing Variables from Frontend Users to UDTs
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?
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?
Re: Passing Variables from Frontend Users to UDTs
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!
$extravar = $_REQUEST["m1_input_email"];
mail($extravar,'Profile Updated','Your profile has been updated');
Thanks for everyone's help!