I have this multiselect dropdown
when user selects multiple options Example 2,3,4
Then I am saving like this
var countries = [];
$.each($(".country option:selected"), function(){
countries.push($(this).val());
});
and save to DB with var country= countries.join(", ");
Now when a user comes & edits these multi-select saved values I want these pre-saved options 2,3,4 should be selected & rest in the list to be unselected so that the user can modify its choice & can select any other items from the option
For saving, I have bootstrap modal pop with this HTMLselect option & other controls. after save they appear in a grid view, in grid view on each row id user can edit the select options in another modal pop and saves edited values in DB.
Please help

Siddharth GajbhiyeRank #376 · 6.7K reputationPosted Apr 14, 2021, 1:27 AM EDT
r k144 reputationPosted Apr 14, 2021, 9:28 PM EDT