Do not consider submit buttons when checking form completion

refs #5525
This commit is contained in:
Johannes Meyer 2014-07-21 15:25:00 +02:00
parent a73e2ee654
commit 75e09f2c69
1 changed files with 3 additions and 1 deletions

View File

@ -232,6 +232,8 @@ class Form extends Zend_Form
/**
* Return whether the given data provides a value for each element of this form
*
* Note that elements that are disabled or of type submit are not taken into consideration.
*
* @param array $formData The data to check
*
* @return bool
@ -249,7 +251,7 @@ class Form extends Zend_Form
array_filter(
$elements,
function ($el) {
return $el->getAttrib('disabled') === null;
return $el->getAttrib('disabled') === null && $el->getType() !== 'submit';
}
),
$formData