Do not consider disabled elements when checking form completion
Values of disabled inputs are not sent by browsers. refs #5525
This commit is contained in:
parent
6ed3d5fdbd
commit
f5ac592645
|
@ -245,7 +245,15 @@ class Form extends Zend_Form
|
|||
throw new LogicException('Forms without elements cannot be complete');
|
||||
}
|
||||
|
||||
$missingValues = array_diff_key($elements, $formData);
|
||||
$missingValues = array_diff_key(
|
||||
array_filter(
|
||||
$elements,
|
||||
function ($el) {
|
||||
return $el->getAttrib('disabled') === null;
|
||||
}
|
||||
),
|
||||
$formData
|
||||
);
|
||||
return empty($missingValues);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue