Is there a way to send multiple values in the data-editor-value?

Is there a way to send multiple values in the data-editor-value?

timwoolleytimwoolley Posts: 10Questions: 3Answers: 0

I have a multiple checkbox input in the editor and am trying to find a way to have the currently selected items be checked when you open the editor. For single select boxes this works great by passing the id in the data-editor-value.

HTML:

<span data-editor-value="{{ semicolon_separated_ids }}" data-editor-field="some_field">{{ some_field_name }}</span>

JS:

{
            label: 'Some Label',
            name: 'some_field_name',
            required: true,
            type: 'checkbox',
            multiple: true,
            separator: ';',
            options: []
        }

Answers

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin

    That looks like it should work since you have the separator option set to be a semi-colon. Can you link to a test case showing the issue please?

    Thanks,
    Allan

This discussion has been closed.