select2 plug-in data getting deleted in database when bubble editing
select2 plug-in data getting deleted in database when bubble editing
When I submit a change of another field, via the bubble editor, any previous data saved in the full editor form with a select2 type is overwritten. If I change the field type to a checkbox and bubble edit, everything works as expected. Does anyone know why this would be the case?
{
"label": "Area(s):",
"name": "areas[].ID",
"type": "select2",
"opts": {
"placeholder": "Select Area(s)",
"allowClear": true,
"multiple": true//,
//"tags": true,
//"tokenSeparators": [',', ' ']
}
//,
//render: function ( data, type, row ) {
//return (alert(row['value']));
//}*/
},
This discussion has been closed.
Answers
I've just tried modifying this example locally to use Select2 - this was the field definition I used:
It actually appears to work okay, but I am running a dev version of Editor which I believe has already addressed the issue. It will be released as Editor 1.5.5 probably on Monday.
When you submit the bubble edit what parameters are submitted to the server?
Thanks,
Allan
Allan,
The issue is that the areas array is empty when another field is edited via the bubble editor. This is not the case if I change the type to checkbox. For some reason, the select2 payload doesn't go along for the ride.
select2
checkbox
Thank you very much for your help and if you want to send 1.5.5 beta I am more than willing to see if that solves the issue.
Chad