In CF 6 I have a dropdown list of Regions, which I have also in the new CF 7.
I want the emails custom template to not report the values of the dropdown, but list them in as the full text, and without the []. The CF 6 someone on this forum wrote a PHP script as follows that worked perfectly however it does not work in CF7 or I'm not putting it in the correct place.
$region_array = array(
"1" => 'Region 1',
"2" => 'Region 2',
"3" => 'Region 3',
"4" => 'Region 4',
"5" => 'Region 5',
"6" => 'Region 6',
"7" => 'Region 7',
"8" => 'Region 8',
"9" => 'Region 9'
);
return implode(", ", array_intersect_key($region_array, array_flip($this->data("regions"))));
How do I do this for emails in CF 7??? Where to I put it and do I now have to write a variable. I'm lost!!!
Thanks much,
Donna
I want the emails custom template to not report the values of the dropdown, but list them in as the full text, and without the []. The CF 6 someone on this forum wrote a PHP script as follows that worked perfectly however it does not work in CF7 or I'm not putting it in the correct place.
$region_array = array(
"1" => 'Region 1',
"2" => 'Region 2',
"3" => 'Region 3',
"4" => 'Region 4',
"5" => 'Region 5',
"6" => 'Region 6',
"7" => 'Region 7',
"8" => 'Region 8',
"9" => 'Region 9'
);
return implode(", ", array_intersect_key($region_array, array_flip($this->data("regions"))));
How do I do this for emails in CF 7??? Where to I put it and do I now have to write a variable. I'm lost!!!
Thanks much,
Donna
Hi Donna, you problem is not realy clear to me, but if you are looking for a dynamic dropdown -field , you will find a tutorial at youtube : https://www.youtube.com/watch?v=oTjb9mBxgco
Cheers Eddi
Cheers Eddi
Eddi,
Thank you for your reply. However I am not trying to read data from another data table.
If the value choose in the dropdown is ["1"], ["3"], ["5"]
I would like the email to user and other emails to list: Region 1, Region 3, Region 5
No brackets, no quote marks and put the word Region before each value.
Thank you though.
Donna
Thank you for your reply. However I am not trying to read data from another data table.
If the value choose in the dropdown is ["1"], ["3"], ["5"]
I would like the email to user and other emails to list: Region 1, Region 3, Region 5
No brackets, no quote marks and put the word Region before each value.
Thank you though.
Donna
After hours of experimenting with CF7 I couldn't find out , how to send a Dropdown-Field in an E-mail-Action.
But when you go to
Here you can download the example:[file=https://hidrive.ionos.com/share/083y8wep-h]DropdownField_to_email.cf7bak[/file]
The upload of pictures or files still does not work here in the forum since years. Why?
But when you go to
- the Forms-Settings ->Behaviors you can activate "User Email".
- Here you have to place into the "Body": {email_content}.
Here you can download the example:[file=https://hidrive.ionos.com/share/083y8wep-h]DropdownField_to_email.cf7bak[/file]
The upload of pictures or files still does not work here in the forum since years. Why?
Eddie,
I use all custom template information to email. A few because I can format the information for other members to automatically create articles from information from the forms. So instead of {email_contents}, I chose to create a custom page that is sent,
Example html:
<h3>New Posting</h3>
<p>{data:date}</p>
<p>{data:first_name}</p>
<p>{data:last_name},/p>
<p>{data:regions}</p>
And so on, with each of my fields. Regions my drop-down, returns the information as [1], [3], [4]
I'm just trying to get it to list the information as: Region 1, Region 3, Region 4 in the email.
Thanks much,
Donna
I use all custom template information to email. A few because I can format the information for other members to automatically create articles from information from the forms. So instead of {email_contents}, I chose to create a custom page that is sent,
Example html:
<h3>New Posting</h3>
<p>{data:date}</p>
<p>{data:first_name}</p>
<p>{data:last_name},/p>
<p>{data:regions}</p>
And so on, with each of my fields. Regions my drop-down, returns the information as [1], [3], [4]
I'm just trying to get it to list the information as: Region 1, Region 3, Region 4 in the email.
Thanks much,
Donna
In the dropdown-field you have to name the values same like text or leave the text blank.
Then try this:
{data.ul:regions}
or
{data.join[,]:regions}
Then try this:
{data.ul:regions}
or
{data.join[,]:regions}
You need to login to be able to post a reply.