formbuilder icon indicating copy to clipboard operation
formbuilder copied to clipboard

Editing the options of a "multiple choices" not working

Open andydhobbs opened this issue 8 years ago • 0 comments

Hi,

I've been experimenting and found a problem with the multiple-checkbox/multiple choices field

Looking at my own running builder and the example at https://github.com/Kinto/formbuilder. If you try to edit the choices available the changes do not save/update. If you change the text of a choice it is not saved and it you add a choice it is not saved.

Looking at config.js I think it is how the field type is defined that is causing the problem:

{ id: "multiple-checkbox", icon: "check", label: "Multiple choices", jsonSchema: { type: "array", title: "A multiple choices list", items: { type: "string", enum: ["choice 1", "choice 2", "choice 3"], }, uniqueItems: true, }, uiSchema: { "ui:widget": "checkboxes", editSchema: { type: "object", properties: { title: {type: "string", title: "Label"}, required: {type: "boolean"}, enum: { type: "array", title: "Choices", items: { type: "string" }, default: ["choice 1", "choice 2", "choice 3"], } } }, }, formData: {} }, I am trying to fix this and will post an update when I have.

andydhobbs avatar May 12 '17 05:05 andydhobbs