// include/inc_front/content/cnt23.article.inc.php // around line 489 // check the marked line!!! - only this should be changed case 'checkbox' : /* * Checkbox */ if($POST_DO && ($cnt_form["fields"][$key]['required'] || isset($_POST[$POST_name]) ) ) { if(isset($_POST[$POST_name]) && is_array($_POST[$POST_name])) { $POST_val[$POST_name] = array_map('combined_POST_cleaning', $_POST[$POST_name]); $POST_val[$POST_name] = array_diff($POST_val[$POST_name], array('')); if(!count($POST_val[$POST_name])) { $POST_val[$POST_name] = false; } } else { $POST_val[$POST_name] = isset($_POST[$POST_name]) ? remove_unsecure_rptags(clean_slweg($_POST[$POST_name])) : false; } if($cnt_form["fields"][$key]['required'] && !$POST_val[$POST_name]) { $POST_ERR[$key] = $cnt_form["fields"][$key]['error']; } else { $cnt_form["fields"][$key]['value'] = str_replace(' checked', '', $cnt_form["fields"][$key]['value']); } } // $form_value = explode("\n", $cnt_form["fields"][$key]['value']); $form_value = array_map('trim', $form_value); $form_value = array_diff($form_value, array('')); /////////////////////////////////////////////////////////////////// if($cnt_form["fields"][$key]['class']) { $form_field .= '
'; $checkbox_class = '
'; } else { $checkbox_class = ''; } /////////////////////////////////////////////////////////////////// if($cnt_form["fields"][$key]['style']) { $checkbox_style = ' style="'.$cnt_form["fields"][$key]['style'].'"'; } else { $checkbox_style = ''; } if(count($form_value) == 1 || count($form_value) == 0 || !$form_value) { // only 1 checkbox $checkbox_value = is_array($form_value) ? implode('', $form_value) : $form_value; $checkbox_value = trim($checkbox_value); if(isset($POST_val[$POST_name]) && $POST_val[$POST_name] == ($checkbox_value ? $checkbox_value : $form_name)) { $checkbox_value .= ' checked'; } $checkbox_value = $checkbox_value ? html_specialchars($checkbox_value) : $form_name; $form_field .= ''; } else { $checkbox_value = str_replace(' checked', '', $checkbox_value); $form_field .= 'value="' . $checkbox_value . '" checked="checked" />'; } $form_field .= '