Comma Separated String as DataProp for Checkbox (Multiple Select) in Editor

Comma Separated String as DataProp for Checkbox (Multiple Select) in Editor

GG Posts: 16Questions: 7Answers: 0

Hello Allan,

What is the best possible option, when using an Editor to edit a record that requires multiple choices for a field.
For Example :

Schedule Delivery Day : [] Monday [] Tuesday [] Wednesday [X]Thursday [X]Friday []Saturday [_]Sunday

When editing an existing record using data table editor, the dataProp has a comma separated string.
DataProp : "Thursday,Friday"
Also when editor passes back value to serverside, It would be preferred as comma separated string.

Using inOpts I am able to display multiple option in checkbox, however, what I can do to select multiple options.

case "checkbox":
{
editobj = {
"label": lbl + ":",
"fieldInfo": "" + lblinfo + "",
"name": "" + lblname + "",
"dataProp": localnumdata[i],
"type": "checkbox",
"ipOpts": Radio_Checkbox_OptionListLoad("csadataship" + lblname)
}
} break;

Thank You.

Answers

  • allanallan Posts: 61,869Questions: 1Answers: 10,137 Site admin

    The checkbox field type has a separator option which you can use - e.g.

    separator: ','
    

    That will tell the field to expect and send a comma separated string.

    Allan

This discussion has been closed.