Search for names in a Select Option Html Php MySql

-1

I have this problem, I want to create a client name search engine that is auto-completed in a select option here my code:  

            <div class="form-group">

              <div class="input-group">

                <span class="input-group-addon"><i class="fa fa-users"></i></span>

                <select class="form-control" id="seleccionarCliente" name="seleccionarCliente" required>

                <option value="">Seleccionar cliente</option>

                <?php

                  $item = null;
                  $valor = null;

                  $categorias = ControladorClientes::ctrMostrarClientes($item, $valor);

                   foreach ($categorias as $key => $value) {

                     echo '<option value="'.$value["id"].'">'.$value["nombre"].'</option>';

                   }

                ?>

                </select>

                <span class="input-group-addon"><button type="button" class="btn btn-default btn-xs" data-toggle="modal" data-target="#modalAgregarCliente" data-dismiss="modal">Agregar cliente</button></span>

              </div>

            </div>
    
asked by AllegroCantabile 16.08.2018 в 08:58
source

1 answer

0

I think it's better to use something already created, which could be bootstrap selected ... link = > Bootstrap-select

the documentation is good and it will take you 5 minutes to implement it.

greetings

    
answered by 16.08.2018 в 14:09