MultiSelect does not show up in form.serialize() if no value selected.
Editor components like the pickers, textboxes, etc. use an internal
<input> element while submitting to get their value from. This value shows up in form.serialize() even when no value selected/provided.
Posted on:30 Jan 2023 14:01
I won't be submitting a support ticket because:
1. I already did (1593326), which lead to this feature request.
2. I already have a workaround in place.
The purpose of the feature request was so that, in the future, I wouldn't have to use that workaround and the control would report itself to form.serialize() even when empty. I realize that this is not "normal" functionality for a <select> object... that's why it would be a "feature". Again, disappointed that this was set to "Declined" so rapidly and not considered.
Posted on:30 Jan 2023 10:17
I suggest opening a new support thread with further details about your scenario. If you could provide a small Dojo example, it will make it easier to test a possible solution for your case.
Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.
Posted on:23 Jan 2023 13:03
I don't believe a Kendo Form would not work in the particular scenario that prompted this feature request, as I am building a form dynamically with no model... what is on the form depends on some user selections and can vary significantly.
Despite the challenges posed by the <select> element, would still be nice if the Telerik version of this could report itself when form.serialize() is called. Just wanted to throw this out there and see if anyone else had similar issues and would like to see this kind of change. Unfortunately, since the status has been set to "Declined", I doubt anyone will bother to upvote (but please do anyways!)
"Only selected options will be successful (using the control name "component-select"). When no options are selected, the control is not successful and neither the name nor any values are submitted to the server when the form is submitted. Note that where the value attribute is set, it determines the control's initial value, otherwise it's the element's contents."