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

Fix default dropdown value #521

Merged

Conversation

cconard96
Copy link
Contributor

@cconard96 cconard96 commented May 19, 2022

If no default is specified in the field config, null was used instead of 0. For at least itemtype dropdowns, instead of showing the empty choice, it would show an empty dropdown. This seemed to be intentional in the core to be able to have no value selected at all, not even the empty choice.

See:
glpi-project/glpi#8682

Having a null value prevented the field from being sent when the form was submitted and would therefore bypass the mandatory field check.
Ref !23913 (Possibly. I noticed this issue while troubleshooting but their screenshot shows the empty choice being selected instead of an empty box).

@cconard96 cconard96 changed the base branch from develop to master May 19, 2022 21:37
@cedric-anne cedric-anne added this to the 1.15.2 milestone May 25, 2022
@cedric-anne cedric-anne merged commit 59afad0 into pluginsGLPI:master May 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants