Zebra_Form
Zebra_Form copied to clipboard
a file upload with a dependency on a checkbox value, fails
There is an error in zebra_form.php in the _validate_dependencies function
This line:
if ($control_properties->attributes['name'] == $proxy && ($control_properties->attributes['type'] == 'radio' || $control_properties->attributes['name'] == 'checkbox')) {
should be
if ($control_properties->attributes['name'] == $proxy && ($control_properties->attributes['type'] == 'radio' || $control_properties->attributes['type'] == 'checkbox')) {
With the code as it is, if you have a file upload field that depends on a checkbox being checked, then the file you choose will not be uploaded.
I have confirmed that with my suggested correction, that the file upload will then work correctly