Zebra_Form icon indicating copy to clipboard operation
Zebra_Form copied to clipboard

a file upload with a dependency on a checkbox value, fails

Open njwgh opened this issue 3 years ago • 0 comments

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

njwgh avatar May 27 '21 11:05 njwgh