Is it possible to label the select inputs?

Is it possible to label the select inputs?

Miko12359Miko12359 Posts: 7Questions: 4Answers: 0
edited August 2018 in Free community support

Hello,
I have a table using the Individual column searching (select inputs), I want to be able to label the inputs so that the user knows what each drop down list does.
If that is not possible, is there a way to replace the default blank selected input and replace it with something else without messing up the results.

As you can see from this image, the list shows a blank value which i either want to replace without changing the filter, or attach a label next to the list.
Thank you

p.s
I am using https://datatables.net/examples/api/multi_filter_select.html

This question has an accepted answers - jump to answer

Answers

  • kthorngrenkthorngren Posts: 20,269Questions: 26Answers: 4,765
    Answer ✓

    All you need to do is put what you want between the <option value=""></option> in this line:
    var select = $('<select><option value=""></option></select>')

    For example:
    var select = $('<select><option value="">Search</option></select>')

    Just make sure to leave the value as blank because that is the value searched. Blank will return all rows.

    Kevin

  • Miko12359Miko12359 Posts: 7Questions: 4Answers: 0

    Thank you

This discussion has been closed.