Hope you can understand this subject.
I have a number of checkboxes, with teh possibility to check various options
But if a checkbox is not checked, teh email shows teh ID of this checkbox
In other words, if e.g. Themales 1 is not checked, {themales_1} should not be visible
I have a number of checkboxes, with teh possibility to check various options
But if a checkbox is not checked, teh email shows teh ID of this checkbox
Themales 1 {themales_1}
Themales 2 {themales_2}
Themales 3 {themales_3}
Themales 4 Short Game dd 29-12-2013
Themales 5 {themales_5}
Themales 6 {themales_6}
In other words, if e.g. Themales 1 is not checked, {themales_1} should not be visible
Hi Bob,
I found this topic
http://www.chronoengine.com/forums/index.php?option=com_chronoforums&cont=posts&f=2&t=88211&p=305771&hilit=checkbox+null#p305771
This solved the issue I had....
Code:
I found this topic
http://www.chronoengine.com/forums/index.php?option=com_chronoforums&cont=posts&f=2&t=88211&p=305771&hilit=checkbox+null#p305771
This solved the issue I had....
Code:
<?php
$checkbox_array = array (
'themales_1',
'themales_2',
// add more checkbox names here
);
foreach ( $checkbox_array as $c ) {
if ( !isset($form->data[$c]) || !$form->data[$c] ) {
$form->data[$c] = '';
}
}
?>
This topic is locked and no more replies can be posted.