user3701485
user3701485

Reputation: 315

Bootstrap multi-select select all option value

I am using bootstrap-multiselect plugin.

jQuery

$("#country").multiselect({
    enableFiltering: true,
    includeSelectAllOption: true,
    numberDisplayed: 2,
    maxHeight: 400,
    buttonWidth: '100%',
    selectAllValue: '0'
});

when I select the select all option and submit the code i get an array of all other options in server side.But i am assigning the value 0 for the select all option which i am not getting in server side.How can i include the value 0 in the value array when i select the select all option.

Upvotes: 0

Views: 3982

Answers (1)

David Stutz
David Stutz

Reputation: 2618

As outlined in the Server Side Processing section of the documentation, the selectAllValue merely alters the value submitted. However, in order to correctly submit the select all option, you have to set the name of the select all option using selectAllName. Btw: when aiming to process the multiselect data server side, you should also use checkboxName.

Upvotes: 1

Related Questions