Question about mutiple select in editor
Question about mutiple select in editor
yu yen kan
Posts: 65Questions: 31Answers: 0
I have a field declare like this
label: "object:",
name: "object.field_id",
multiple: true,
separator: ", ",
type: "select",
ipOpts: [ { label:"object 1", value:"1"}, { label:"object 2", value:"2"} ]
since it is multiple select, by default the object is included object 1 and object 2, but when I press edit, it have no selected value. what should I do to make it selected when edit?
This discussion has been closed.
Replies
The default should match the form of the data if you were to use
field().val()
to get the field's value.Because you are using a separator, that will be a string here. If you didn't use a separator, but did retain the
multiple
it would be an array.Allan