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

Checkbox with Standard Option resets when going back steps #74

Open
FlorinvV opened this issue Jun 19, 2023 · 1 comment
Open

Checkbox with Standard Option resets when going back steps #74

FlorinvV opened this issue Jun 19, 2023 · 1 comment

Comments

@FlorinvV
Copy link

I noticed that a checkbox, which is declared as Standard-Option will always be active, as soon as I return to its step of the Form, even if it is deactivated in process.

The Value is saved correctly though, if I go through the form without retracing steps, it works fine.

Tested with:
terminal42/contao-mp_forms 5.0.1
Contao 4.13.20

@Toflar
Copy link
Member

Toflar commented Dec 6, 2023

Yes, this is something I unfortunately cannot fix. mp_forms works correctly, as far as I can tell. But the FormCheckbox widget of Contao does not. If you uncheck all options, the submitted value will be ''. And if you give it this value using $widget->value = '', it will render the defaults. So it does not make a difference between not set at all and no values selected.

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

2 participants