Home  >  Q&A  >  body text

Bootstrap country selector defaults to "unselected"

With the Bootstrap country selector, I am using the code below to populate the countries. It works fine but there is no "unselected" default value. Is there any solution...?

<script>
  $('.countrypicker').countrypicker();
</script>

    <select class="form-control selectpicker countrypicker" id="country" name="country" data-flag="true" data-default=""></select>

P粉969666670P粉969666670245 days ago336

reply all(1)I'll reply

  • P粉627427202

    P粉6274272022024-02-18 00:24:52

    If you want to change the text "Nothing selected", set the title attribute to whatever you need.

    For example: title="My custom text"

    
    

    reply
    0
  • Cancelreply