title: how to enable multiple select picker
body: <p>I am trying to use this bootstrap select picker where multiple values can be selected, by default I want it to be disabled. So in order to enable it a button must be pressed. Problem is that pressing the button will not re-enable this specific field, other fields linked to it work fine.</p>
  <p>Anyways the code not working is as follows any help would be greatly appreciated.</p>
  <pre><code> &lt;form method=&quot;post&quot; action=&quot;{{route('updateuser')}}&quot; &gt;
       @csrf
       &lt;table class=&quot;table  table-bordered&quot;&gt;
           &lt;thead&gt;
              &lt;tr&gt;
                  &lt;th scope=&quot;col&quot;&gt;ID&lt;/th&gt;
                  &lt;th scope=&quot;col&quot;&gt;User Name&lt;/th&gt;
                  &lt;th scope=&quot;col&quot;&gt;Email&lt;/th&gt;
                  &lt;th scope=&quot;col&quot;&gt;Role&lt;/th&gt;
                  &lt;th scope=&quot;col&quot;&gt;Sites&lt;/th&gt;
                  &lt;th scope=&quot;col&quot;&gt;Created At&lt;/th&gt;
                  &lt;th scope=&quot;col&quot;&gt;Updated At&lt;/th&gt;
                  &lt;th scope=&quot;col&quot;&gt;Edit&lt;/th&gt;
              &lt;/tr&gt;
          &lt;/thead&gt;
              @if(count($users)!=0)
                  @foreach($users as $user)
                      &lt;tr&gt;
                          &lt;td&gt;&lt;input type='text' name=&quot;id&quot; placeholder=&quot;User ID&quot; value='{{ $user-&gt;id }}' readonly&gt;&lt;/td&gt;
                          &lt;td&gt;&lt;input type='text' name=&quot;name&quot; placeholder=&quot;Name&quot; value='{{ $user-&gt;name }}' disabled&gt;&lt;/td&gt;
                          &lt;td&gt;&lt;input type='text' name=&quot;email&quot; placeholder=&quot;Email&quot; value='{{ $user-&gt;email }}' disabled&gt;&lt;/td&gt;
                           &lt;td&gt;&lt;select name=&quot;role&quot; disabled&gt;                                                            
                               &lt;option&gt;none&lt;/option&gt;
                               &lt;option&gt;Reporter&lt;/option&gt;
                               &lt;option&gt;Admin&lt;/option&gt;
                               &lt;option&gt;Super Admin&lt;/option&gt;
                           &lt;/select&gt;&lt;/td&gt;
                           &lt;td&gt;&lt;select class=&quot;selectpicker selectsite&quot; multiple name=&quot;{{$user-&gt;id}}sitesSelected[]&quot; disabled&gt;
                               &lt;option selected&gt;  {{$site[0]-&gt;sitename}}&lt;  &lt;/option&gt;
                               &lt;option&gt; {{$site[1]-&gt;sitename}} &lt;/option&gt;
                               &lt;option&gt; {{$site[2]-&gt;sitename}} &lt;/option&gt;
                           &lt;/select&gt;&lt;/td&gt;
                           &lt;td&gt;&lt;input type='text' name=&quot;created_at&quot; placeholder=&quot;created_at&quot; value='{{ $user-&gt;created_at }}' readonly&gt;&lt;/td&gt;
                           &lt;td&gt;&lt;input type='text' name=&quot;updated_at&quot; placeholder=&quot;updated_at&quot; value='{{ $user-&gt;updated_at }}' readonly&gt;&lt;/td&gt;
                           &lt;td&gt;&lt;input type=&quot;button&quot; name='edit' value='edit'&gt;
                           &lt;input type=&quot;submit&quot; name='save' value='save'&gt;
                           &lt;button type=&quot;button&quot; id=&quot;btnDelete&quot; data-toggle=&quot;modal&quot; data-target=&quot;#userModal&quot; value=&quot;{{ $user-&gt;id }}&quot;&gt;Delete&lt;/button&gt;&lt;/td&gt;
                      &lt;/tr&gt;
                  @endforeach 
              @endif
          &lt;/table&gt;
          {{ $users-&gt;links() }}
      &lt;/form&gt;
  </code></pre>
  <pre><code>$(document).ready(function(){
      $(&quot;form input[type=text]&quot;).prop(&quot;disabled&quot;,true);
      $(&quot;input[name=edit]&quot;).on(&quot;click&quot;,function(){
          $(this).closest(&quot;tr&quot;).find(&quot;input,select&quot;).prop(&quot;disabled&quot;,false);
      })
  })
  </code></pre>
  <p>As can be seen in the code this is a specific part of a table where the tables data is an editable value, the rest are input boxes which work fine but for this part doesn't work.</p>
  <p>Any help would be greatly appreciated.</p>