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 rendering of user-entered values in editable listbox-multiple TVs #16242

Merged
merged 2 commits into from Nov 2, 2022

Conversation

smg6511
Copy link
Collaborator

@smg6511 smg6511 commented Aug 8, 2022

What does it do?

Refactored the listbox-multiple render class to ensure values that are not in a TV’s pre-defined options are rendered properly. The code has been restructured to make it more intuitive, as the previous code had a rather convoluted way of collecting and separating the selected (saved) and unselected values.

Why is it needed?

User-entered values are saved to the database but are not subsequently rendered when reloading the Resource form.

How to test

  1. Create a listbox-multiple TV with Enable Type-Ahead on and Require Match set to “No.”
  2. Enter a set of Input Options for the TV.
  3. Make the TV available to a Resource and experiment with making selections from the dropdown, as well as entering ones directly in the field. Save the Resource and re-load it to verify all values show in the TV field as expected.

Related issue(s)/PR(s)

Resolves #15136.

Render user-entered values in editable listbox-multiple TVs
@cla-bot cla-bot bot added the cla-signed CLA confirmed for contributors to this PR. label Aug 8, 2022
Tweak to variable name
@JoshuaLuckers JoshuaLuckers added this to the v3.1.0 milestone Aug 28, 2022
@smg6511
Copy link
Collaborator Author

smg6511 commented Aug 30, 2022

@JoshuaLuckers - Quick note: Because this is a pretty major bug fix and not a new feature or just an improvement, I'd suggest changing the milestone to 3.0.2. (I'm actually surprised we haven't seen more complaints about the bug.) While I know I could change this myself, I thought maybe you had a particular reason for making it a minor release instead of a patch one.

@JoshuaLuckers JoshuaLuckers modified the milestones: v3.1.0, v3.0.2 Aug 31, 2022
@opengeek opengeek merged commit 8872737 into modxcms:3.x Nov 2, 2022
@smg6511 smg6511 deleted the 3.x-issue-15136 branch March 30, 2024 02:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla-signed CLA confirmed for contributors to this PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

User-entered data in a TV with a Listbox (Multi-Select) type is not displayed in the resource form
3 participants