BUG 7422 Checkbox value was not saved SOLVED (review fix issues)

This commit is contained in:
Erik Amaru Ortiz
2011-08-19 12:22:23 -04:00
parent 3e6162ecc1
commit e1ad964491

View File

@@ -518,7 +518,7 @@ class Form extends XmlForm
return count($notPassedFields) > 0 ? $notPassedFields : false; return count($notPassedFields) > 0 ? $notPassedFields : false;
} }
function validateFields($_POST) { function validateFields($dataFields) {
$values = array(); $values = array();
$excludeTypes = array('submit', 'file'); $excludeTypes = array('submit', 'file');
@@ -526,12 +526,12 @@ class Form extends XmlForm
if (!in_array($v->type, $excludeTypes)) { if (!in_array($v->type, $excludeTypes)) {
switch($v->type) { switch($v->type) {
case 'checkbox': case 'checkbox':
$_POST[$v->name] = isset($_POST[$v->name])? $_POST[$v->name] : $v->falseValue; $data[$v->name] = isset($data[$v->name])? $data[$v->name] : $v->falseValue;
break; break;
default: default:
} }
} }
} }
return $_POST; return $data;
} }
} }