DataTables Editor formOptions: main: submit: 'changed' always includes checkboxes

DataTables Editor formOptions: main: submit: 'changed' always includes checkboxes

klydeklyde Posts: 2Questions: 1Answers: 1

I have a DataTable Editor initialized with the following fields:

{
    label: "Test Text Box",
    name: "test_text",
},
{
    label: "Test",
    name: "test_check",
    type: "checkbox",
    separator: "",
    unselectedValue: 0,
    options: [
        { label: '', value: 1 }
    ],
},

The form options are set as:

formOptions: {
    main: {
        submit: 'changed',
    },
},

When I submit the form, the submit: 'changed' property works correctly for the text field, but the checkbox field is always submitted, regardless of whether its value was changed.

Thanks for any help.

This question has an accepted answers - jump to answer

Answers

  • klydeklyde Posts: 2Questions: 1Answers: 1
    Answer ✓

    The solution is as follows:

    The separator value must be set to " " instead of "" (one space).

  • allanallan Posts: 61,726Questions: 1Answers: 10,110 Site admin

    Thanks for posting back - great to hear you've got it working.

    Allan

This discussion has been closed.