Editor and Select Field types.

Editor and Select Field types.

arichardsonarichardson Posts: 16Questions: 3Answers: 0

Is there a way to specify a SELECT is a MULTI-SELECT?

For example, I want to use a SELECT in the EDIT mode of our Datatable, where the user can specify MULTIPLE entries?

{
label: "Groups:",
name: "CATEGORY",
type: "select"
}

This question has an accepted answers - jump to answer

Answers

  • aaronwaaronw Posts: 89Questions: 3Answers: 4
    Answer ✓

    http://editor.datatables.net/reference/field/select should be able to help out.

    do:

    type: "select",multiple:true
    
  • arichardsonarichardson Posts: 16Questions: 3Answers: 0
    edited November 2015

    Thanks!

    Is there more to it than that?

    I added the multiple option... but alas, it still only allows me to choose one.

    {
    label: "Group:",
    name: "CATEGORY",
    type: "select",
    multiple: "true"
    }
    
  • arichardsonarichardson Posts: 16Questions: 3Answers: 0

    NEVERMIND! I GOT IT!

    I had tried it without quotes before... and it didn't work. Must have been something else.

    Works like a champ now.

    THANKS!

  • aaronwaaronw Posts: 89Questions: 3Answers: 4

    "true" is not necessarily the same as true - one is a string and one is a boolean. If that doesn't work, more code & samples will be needed.

  • allanallan Posts: 63,522Questions: 1Answers: 10,473 Site admin

    Hi,

    Yes, this is exactly correct. Its one of the many quirks of Javascript: "true" == true but "true" !== true!

    The boolean true is not strictly the same as the string true.

    Good to hear you've got it up and running now.

    Regards,
    Allan

This discussion has been closed.