I am using the Email [GH] to parse my form and if the condition is met send the e-mail
I have several Email [GH] looking for different items to send different e-mails
The first looks for {REG1}::1,{REG2}::1 and sends an email template #1 to my team.
The second looks for {PROV1}::1,{PROV2}::1 and sends an email template #2 to my team
The logic is that a user of the form selects an item in either (REG1 and REG2) or (PROV1 and PROV2).
By default there is a 'space' character in all the locations until they are selcted
The problem is that when any of the items are selected (it has a 1 in the entry), two emails are sent (template #1 and template #2)
Is there something I am doing wrong?
Should the {REG1}::1 really look like {REG1}::'1' or {REG1}::"1" or is there something else?
Thanks in advance for any clues that could be provided.
Kevin
I have several Email [GH] looking for different items to send different e-mails
The first looks for {REG1}::1,{REG2}::1 and sends an email template #1 to my team.
The second looks for {PROV1}::1,{PROV2}::1 and sends an email template #2 to my team
The logic is that a user of the form selects an item in either (REG1 and REG2) or (PROV1 and PROV2).
By default there is a 'space' character in all the locations until they are selcted
The problem is that when any of the items are selected (it has a 1 in the entry), two emails are sent (template #1 and template #2)
Is there something I am doing wrong?
Should the {REG1}::1 really look like {REG1}::'1' or {REG1}::"1" or is there something else?
Thanks in advance for any clues that could be provided.
Kevin
I should add the the two Condition items are:
{REG1}::1, {REG1}::2, {REG1}::3, {REG1}::4 template 1
and
{PROV1}::1, {PROV1}::2, {PROV1}::3, {PROV1}::4, template 2
If I have just
{REG1}::1
and
{PROV1}::1
it seems to work just fine. I assume (maybe I shouldn't) be able to add multiple searches OR switches
{REG1}::1, {REG1}::2, {REG1}::3, {REG1}::4 template 1
and
{PROV1}::1, {PROV1}::2, {PROV1}::3, {PROV1}::4, template 2
If I have just
{REG1}::1
and
{PROV1}::1
it seems to work just fine. I assume (maybe I shouldn't) be able to add multiple searches OR switches
Hi Kevin,
You got it, the action doesn’t support multiple conditions. (I'm not sure what it does if you have more than one.)
The solution is to use PHP in a Custom Code action to reduce the variables to a single go/no-go condition and then it will work OK.
I can't make out exactly what the logic is but something like:
Bob
You got it, the action doesn’t support multiple conditions. (I'm not sure what it does if you have more than one.)
The solution is to use PHP in a Custom Code action to reduce the variables to a single go/no-go condition and then it will work OK.
I can't make out exactly what the logic is but something like:
<?php
$form->data['send_reg_email'] = 0;
if ( $form->data['REG1'] == 1 || $form->data['REG2'] == 1 ) {
$form->data['send_reg_email'] = 1;
}
$form->data['send_prov_email'] = 0;
if ( $form->data['PROV1'] == 1 || $form->data['PROV2'] == 1 ) {
$form->data['send_prov_email'] = 1;
}
?>
Bob
Thanks Bob,
I'm guessing that I could have the code:
But,
How and where do I create, store and use the send_prov_email or send_reg_email
Is there a link that I can follow?
Kevin
I'm guessing that I could have the code:
<?php
$form->data['send_reg_email'] = 0;
if ( $form->data['REG1'] > 0 || $form->data['REG2'] > 0 ) {
$form->data['send_reg_email'] = 1;
}
$form->data['send_prov_email'] = 0;
if ( $form->data['PROV1'] > 0 || $form->data['PROV2'] > 0 ) {
$form->data['send_prov_email'] = 1;
}
?>
But,
How and where do I create, store and use the send_prov_email or send_reg_email
Is there a link that I can follow?
Kevin
Hi Kevin,
You'd use those in the Condition box of your Email [GH] actions.
Bob
You'd use those in the Condition box of your Email [GH] actions.
Bob
Hi!!i am spanish and i don´t understand well how work chronoform5
when i try to send the form, in the email only put this:
<table>
<tr><td>Text Label</td><td></td></tr>
</table>
Poster's IP address:83.42.237.169
Why?Can you help me??
the website http://www.alavelacharter.com/es/reservas.html
Thanks!!
KR
Javier
when i try to send the form, in the email only put this:
<table>
<tr><td>Text Label</td><td></td></tr>
</table>
Poster's IP address:83.42.237.169
Why?Can you help me??
the website http://www.alavelacharter.com/es/reservas.html
Thanks!!
KR
Javier
Hi Javier,
Please open the "Email" settings and clear your "Template" box then save and save the form!
Please open a new topic if you need more info!
Regards,
Max
Please open the "Email" settings and clear your "Template" box then save and save the form!
Please open a new topic if you need more info!
Regards,
Max
Hi Max!!Thanks for your help:-)
Now my email is a little better, only some missing data
Can you definitely, help me to solve??
Mail Data:
Nombre y Apellidos: francisco javier villa gonzalez OK
Nº Teléfono {Nº Teléfono} NO
Email jvr.villa@gmail.com OK
¿Dispone de Titulación? PER OK
Embarcación Tipo {Embarcación Tipo} NO
Eslora 12m OK
Fecha desde {Fecha Inicio} NO
Fecha hasta {Fecha hasta} NO
Preferencias ke tenga balsa OK
Poster's IP address:83.42.237.169
Thank you very much!!
Javier
Now my email is a little better, only some missing data
Can you definitely, help me to solve??
Mail Data:
Nombre y Apellidos: francisco javier villa gonzalez OK
Nº Teléfono {Nº Teléfono} NO
Email jvr.villa@gmail.com OK
¿Dispone de Titulación? PER OK
Embarcación Tipo {Embarcación Tipo} NO
Eslora 12m OK
Fecha desde {Fecha Inicio} NO
Fecha hasta {Fecha hasta} NO
Preferencias ke tenga balsa OK
Poster's IP address:83.42.237.169
Thank you very much!!
Javier
Hi Javier,
Fields names should NOT have any spaces, please fix your fields names which have spaces, and then follow the last steps again, clear the email template and save to generate a new one!
Regards,
Max
Fields names should NOT have any spaces, please fix your fields names which have spaces, and then follow the last steps again, clear the email template and save to generate a new one!
Regards,
Max
Thanks!!!:-)
It´s very easy, sorry i am spanish and i don´t know many english and is a few dificult sometime
;-)
It´s very easy, sorry i am spanish and i don´t know many english and is a few dificult sometime
;-)
This topic is locked and no more replies can be posted.