In QSelect multiple option is not working as expected #697
Replies: 2 comments 1 reply
-
Hello, To solve this issue I take the values from the form components list. |
Beta Was this translation helpful? Give feedback.
-
This is not a justpy bug; it is how QSelect works. It is not really a html . Internally it consists many different element but inside there is only one <input> which is used to allow the user to perform keyword search and to allow the html label to work: On the other hand, with Justpy the component's value is updated instantly, so there is no need to wait until form submission. You can also access the "value" attribute of your QSelect to get the latest value. It works when multiple selection is enabled too. |
Beta Was this translation helpful? Give feedback.
-
Hello everyone,
We are currently utilizing the QSelect widget within a form, specifically with the multiple=true argument enabled. However, we've encountered an issue where, upon selecting multiple options in the QSelect dropdown, the widget does not transmit all the selected option IDs to the backend upon form submission. Strangely, it only seems to send a single ID (the ID of the first selected option) in string format. Consequently, we're unable to successfully store and save multiple selected options in our database.
Here's the QSelect widget definition for reference:
And here's the corresponding form definition:
For clarity, I've attached an image illustrating the widget after selecting multiple options:
If anyone has encountered a similar issue or has insights into how to ensure that all selected option IDs are properly transmitted to the backend upon form submission, we would greatly appreciate your assistance.
Thank you in advance for your time and expertise.
Beta Was this translation helpful? Give feedback.
All reactions