| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Fields plugin dropdowns with multiple=1 now work correctly in GLPI Forms. Adds "Allow multiple options" toggle to the form editor when using the "Campo" question type, properly handles array answers in the save pipeline, and applies multi-select values correctly when creating tickets.
- Include 'tab' type containers in getAvailableBlocks() so fields from tab containers can be used in Forms questions (not only 'dom' type) - Fix strlen(): array given error in fields.html.twig by passing the decoded array value via the 'values' option instead of the value parameter when rendering multi-select dropdowns (both custom and GLPI core dropdown types)
- Add trailing comma in MultipleChoiceFromValuesConditionHandler arg - Collapse nested if into single condition (Rector) - Use first-class callable intval(...) instead of string 'intval' (Rector) - Add blank line before return in getDropdownValuesForCondition (Rector)
…ypeControl) - Add blank line before return in getFieldForQuestion() - Use instanceof instead of !== null in isMultipleForQuestion()
| Back | FazBrowse Home | New Git URL |
Summary
Fields plugin dropdowns configured with multiple=1 now work correctly when used in GLPI Forms through the PluginFieldsQuestionType ("Campo" question type).
Problem: When a Fields dropdown with multi-selection enabled was added to a Form, there was no way to enable multi-select behavior in the form editor. The PluginFieldsQuestionType lacked:
Solution (3 files, 115 lines added):
How it works
Design decisions
No breaking changes
Test plan