Hello,
I'm using Chrono Forms v4 RC1.9 on Joomla 1.6.4. When the email is sent and received, checkbox fields that the state of checked is showing the checked state just fine. If a field is unchecked, in the email it shows the {field}. See example of email below. Is there a way to show it blank or not at all if the state is unchecked?
Thanks,
Example: Wash Monthly state is checked, all others are unchecked.
Detailing & Washing Service
Wash Monthly Yes
Wash Bi-Weekly {wash_biweek}
Wash Weekly {wash_weekly}
Waxing/Detailing {wax_detail}
Topsides {topside}
I'm using Chrono Forms v4 RC1.9 on Joomla 1.6.4. When the email is sent and received, checkbox fields that the state of checked is showing the checked state just fine. If a field is unchecked, in the email it shows the {field}. See example of email below. Is there a way to show it blank or not at all if the state is unchecked?
Thanks,
Example: Wash Monthly state is checked, all others are unchecked.
Detailing & Washing Service
Wash Monthly Yes
Wash Bi-Weekly {wash_biweek}
Wash Weekly {wash_weekly}
Waxing/Detailing {wax_detail}
Topsides {topside}
Hi ddouglas,
Unfortunately an un-checked checkbox returns nothing at all when the form is submitted so ChronoForms doesn't know there is a 'null' result. You can drag in a Custom Code action and add this to it to set '' results for these checkboxes.
Bob
Unfortunately an un-checked checkbox returns nothing at all when the form is submitted so ChronoForms doesn't know there is a 'null' result. You can drag in a Custom Code action and add this to it to set '' results for these checkboxes.
<?php
$checkbox_array = array(
wash_biweek,
wash_weekly,
wax_detail,
topside
);
foreach ( $checkbox_array as $v ) {
if ( !$form->data[$v] ) {
$form->data[$v] = '';
}
}
?>
Bob
OK. But, if the values change (and they will), will wash_biweek, change to the value I have as 'Yes' or is this code as I understand it just for the entry that I had in my first post? These values will be different for each submission.
Thanks again,
Thanks again,
Hi ddouglas,
I'm not sure I understand the question. The code just sets an empty '' as the value when the box is unchecked. It doesn't matter what values you have in the form.
Bob
I'm not sure I understand the question. The code just sets an empty '' as the value when the box is unchecked. It doesn't matter what values you have in the form.
Bob
This topic is locked and no more replies can be posted.