Hi,
I installed the email action and what I am trying to do is set this to send certain selected checkbox inputs to this email address. Do I use the condition field on the general tab?
Here is the actual form
https://ortl.org/volunteer-ortl.html
Here is what I tried and it didn't work.........I don't know php of course!
Thank you for helping me,
Diana
I installed the email action and what I am trying to do is set this to send certain selected checkbox inputs to this email address. Do I use the condition field on the general tab?
Here is the actual form
https://ortl.org/volunteer-ortl.html
Here is what I tried and it didn't work.........I don't know php of course!
Thank you for helping me,
Diana
Hi Diana,
Please explain what you are trying to do here?
The Conditional box will only take one value (not a string of three) and it just turns the email on and off. I don't think that is what you want?
Bob
Please explain what you are trying to do here?
The Conditional box will only take one value (not a string of three) and it just turns the email on and off. I don't think that is what you want?
Bob
Hi Greyhead,
I want to have one email address that gets all the submitted information and then other email addresses that get only certain selected information form the checkboxes. Since I need to have the information added to a database, I set up the volunteer options as separate checkboxes.
Here is my events:
I want to have one email address that gets all the submitted information and then other email addresses that get only certain selected information form the checkboxes. Since I need to have the information added to a database, I set up the volunteer options as separate checkboxes.
Here is my events:
Hi Diana,
I don't really understand what you need here :-9
If you want emails with different content then you can use two copies of the email action. If you need to make one of then conditional of some checkboxes being set then you can use PHP in a Custom Code action to set a 'flag' that you can use in the Conditional box.
Bob
I don't really understand what you need here :-9
If you want emails with different content then you can use two copies of the email action. If you need to make one of then conditional of some checkboxes being set then you can use PHP in a Custom Code action to set a 'flag' that you can use in the Conditional box.
Bob
So I only need to use the normal email action and add a custom html/php action above it?
Where do I find the php code to add the flag? I don't know how to write php, should I know, but it really scares me!
Thank you for helping me!
Diana
Where do I find the php code to add the flag? I don't know how to write php, should I know, but it really scares me!
Thank you for helping me!
Diana
Hi Diana,
Can you explain exactly what it is that you need to do - which input names and what happens to them?
Bob
Can you explain exactly what it is that you need to do - which input names and what happens to them?
Bob
Hi Greyhead,
Here is one of the email information that needs to be sent if one or some of these items are checked. If not then no email will be sent.
fundraising
speaking
youth
fair_booths
music_crafts
publicity
mall_tables
other
annual_contests
Here is my testing form for you to see the layout.
http://ortl.org/index.php?option=com_chronoforms&tmpl=component&chronoform=Volunteer_new-Copy
Thank you again and again and again,
Diana
Here is one of the email information that needs to be sent if one or some of these items are checked. If not then no email will be sent.
fundraising
speaking
youth
fair_booths
music_crafts
publicity
mall_tables
other
annual_contests
Here is my testing form for you to see the layout.
http://ortl.org/index.php?option=com_chronoforms&tmpl=component&chronoform=Volunteer_new-Copy
Thank you again and again and again,
Diana
Hi Diana,
Please try this (may need debugging):
Then use send_email::1 in the Email [GH] action conditional box.
Bob
Please try this (may need debugging):
<?php
$form->data['send_email'] = 0;
$check_array = array(
'fundraising',
'speaking',
'youth',
'fair_booths',
'music_crafts',
'publicity',
'mall_tables',
'other',
'annual_contests'
);
foreach ( $check_array as $v ) {
if ( isset($form->data[$v]) && $form->data[$v] ) {
$form->data['send_email'] = 1;
}
}
?>
Then use send_email::1 in the Email [GH] action conditional box.
Bob
Thank you Greyhead, I will try this out today!
Just tried this and I get this error...
Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ']' in /home/ortlorg/public_html/administrator/components/com_chronoforms/form_actions/custom_code/custom_code.php(19) : eval()'d code on line 15
Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ']' in /home/ortlorg/public_html/administrator/components/com_chronoforms/form_actions/custom_code/custom_code.php(19) : eval()'d code on line 15
Hi Greyhead,
I got the php code fixed at stackoverflow. They aren't as nice as you but after they get done with making you feel like a looser, one does come through and tell you what is wrong.
Anyway here is the code that works: (line 15 had to remove the single quotes)
Many thanks and cheers to you Greyhead! Time for a beer!
Diana
I got the php code fixed at stackoverflow. They aren't as nice as you but after they get done with making you feel like a looser, one does come through and tell you what is wrong.
Anyway here is the code that works: (line 15 had to remove the single quotes)
<?php
$form->data['send_email'] = 0;
$check_array = array(
'fundraising',
'speaking',
'youth',
'fair_booths',
'music_crafts',
'publicity',
'mall_tables',
'other',
'annual_contests'
);
foreach ( $check_array as $v ) {
if ( isset($form->data[$v]) && $form->data[$v] ) {
$form->data['send_email'] = 1;
}
}
?>
Many thanks and cheers to you Greyhead! Time for a beer!
Diana
Hi Diana,
Sorry about the extra quotes :-(
Bob
PS I will go back and fix my original post for other readers.
Sorry about the extra quotes :-(
Bob
PS I will go back and fix my original post for other readers.
No problem Greyhead I couldn't even begin to write php. I tried to buy you a few beers, but Paypal said they couldn't complete my purchase at this time. I will try again......you deserve a cool one!
Kindest regards and major appreciation,
Diana
Kindest regards and major appreciation,
Diana
This topic is locked and no more replies can be posted.