Skip to content

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

@njwgh

Description

@njwgh

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions