0

I am having a select in my form with multiple select feature and it works good except If I have made any selection I can't remove all the selections as atleast one has to be selected.

How can this remove all selection be achieved. Below is my code for the select

<div class="form-group">
     <label for="factory_access">Factories Access</label>
     {!! Form::select('factories[]', $factories,$edit? $selectedFact:'' , ['class' => 'form-control','id' => 'example-getting-started', 'multiple' => 'multiple']) !!}
</div>
dmSherazi
  • 3,743
  • 5
  • 37
  • 62
  • 1
    I'm not sure if you would consider but I'm using http://selectize.github.io/selectize.js/ for select boxes and it does provide the option you're looking for (and of course many more...) – Can Celik Mar 06 '16 at 00:17
  • @CanCelik Thanks alot ... trying to give it a try but I am not sure why even though after adding the required js and css files and following the example I am not able to get it to work. It makes no change on the page. I am not sure what am I missig – dmSherazi Mar 06 '16 at 00:34
  • @CanCelik Thanks I have solved the issue. selectize , select2 and others were not working for me because of permission issues on the `assets` folder. – dmSherazi Mar 06 '16 at 11:39

1 Answers1

1

As @CanCelik suggested I solved the issue using a jQuery based plugin. I finally used Select2 which is quite similar to Selectize.

I still had problems that the plugin though included in the blade.php would not work and the reason was permissions on the files in assets folder.

Community
  • 1
  • 1
dmSherazi
  • 3,743
  • 5
  • 37
  • 62
  • 1
    Actually I would not recommend Select2. I had wasted days to try getting it working and no luck. Then I found this answer http://stackoverflow.com/questions/15544693/is-there-a-properly-tested-alternative-to-select2-or-chosen and moved to Selectize. The documentation could be better but It's been working without any issues... – Can Celik Mar 07 '16 at 01:30