Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
njwgh opened this issue May 27, 2021 · 0 comments
Open

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

njwgh opened this issue May 27, 2021 · 0 comments

Comments

@njwgh
Copy link

njwgh commented May 27, 2021

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant