This is a similar issue to this post I found: http://forum.cmsmadesimple.org/index.php?topic=33670.0. The problem is, the solution does not work for me.
If I use the default template token, I either get the email address to which the form was routed, or the word "array" prints. I would like to print in the email; which option was selected as shown in the dropdown field (not the resulting email address).
I'm using this syntax in the template per the post above, but nothing it returned: {$fld_99_obj->value}
Can someone help? Thanks!
Get value of "Redirect to Page Based on Pulldown" field?
Re: Get value of "Redirect to Page Based on Pulldown" field?
Upload XML of the form so people would be able to import it on test site.
For me "array" sounds promising http://wiki.cmsmadesimple.org/index.php ... ode.2Fsite
For me "array" sounds promising http://wiki.cmsmadesimple.org/index.php ... ode.2Fsite
Re: Get value of "Redirect to Page Based on Pulldown" field?
Attached is the XML of the form.....
Thanks!
Thanks!
- Attachments
-
[The extension xml has been deactivated and can no longer be displayed.]
Re: Get value of "Redirect to Page Based on Pulldown" field?
Smth went wrong with XML there is no field names. ATM i am using my own naming. Can you write field names and ids by hand to forum (just to make things clear)?
You want to access email subject of corresponding address, don't you ?
EDIT:
OK. so i added field "*Call A User Defined Tag With the Form Results" and "Export form reference to UDT as $params['FORM']? " is on.
UDT you call in this field contains code
You want to access email subject of corresponding address, don't you ?
EDIT:
OK. so i added field "*Call A User Defined Tag With the Form Results" and "Export form reference to UDT as $params['FORM']? " is on.
UDT you call in this field contains code
display value in emails and submission template$search_field_id = '99'; /*field id "*Email Results Based on Pulldown" */
$session_variable = 'destination_subject'; /* session member to store subject */
$search_field_value = 'fld_'.$search_field_id;
foreach($params['FORM']->Fields as $key=>$one_field){
if (!empty($one_field->Name) && !empty($one_field->Id) && $one_field->Id==$search_field_id){
$field_number = $key;
break;
}
}
$email_key = array_search(${$search_field_value}, $params['FORM']->Fields[$field_number]->Options['destination_address']);
$_SESSION[$session_variable] = $params['FORM']->Fields[$field_number]->Options['destination_subject'][$email_key];
EDIT: rewritten UDT so it is enough to supply id of field "*Email Results Based on Pulldown".{$smarty.session.destination_subject}
Last edited by Peciura on Fri Jul 30, 2010 5:21 pm, edited 1 time in total.
Re: Get value of "Redirect to Page Based on Pulldown" field?
Pecuria, thanks first off for helping me troubleshoot. Its much appreciated. Since the XML didn't work, I'm including two screenshots; one of the field options, and another showing the advanced tab for the email template.
Let me know if you need anything else.
Thanks!
(EDIT) on the template screenshot, i realized that the variable {$fld_99} was missing the closing bracket, but fixing it didn't get me any closer. I still only get the value of the field as the email address to which the email is being routed; not the value as selected by the user in the dropdown.
Let me know if you need anything else.
Thanks!
(EDIT) on the template screenshot, i realized that the variable {$fld_99} was missing the closing bracket, but fixing it didn't get me any closer. I still only get the value of the field as the email address to which the email is being routed; not the value as selected by the user in the dropdown.
Last edited by deejmer on Fri Jul 30, 2010 3:52 pm, edited 1 time in total.
Re: Get value of "Redirect to Page Based on Pulldown" field?
Just rewritten UDT so it is enough to supply id of field "*Email Results Based on Pulldown".
Re: Get value of "Redirect to Page Based on Pulldown" field?
Awesome! This looks nice.....Problem though, I dont see the option or indication: "Export form reference to UDT as $params['FORM']? "
I'm running an older version of the form builder (0.4.4), so wonder if the option is there. Where do you find it? Maybe I need to update this module....
I'm running an older version of the form builder (0.4.4), so wonder if the option is there. Where do you find it? Maybe I need to update this module....
Re: Get value of "Redirect to Page Based on Pulldown" field?
It is FormBuilder 0.6.2. You have to upgrade.