0

I'm using select2 plugin to show my dropdown data .

I have problem , because my dropdown select2 have 18000 data . How it is so that the data displayed in part, not all data is loaded. I use the Medoo database framework. how do i do it?

This my source code .

        <div class="form-group">
            <label for="nama_user"><?php _e('Nama User'); ?></label>
            <select class="form-control select2 select2-hidden-accessible" id="nama_user" name="nama_user" style="width: 100%;" tabindex="-1" aria-hidden="true">
                <option value="0"><?php _e('Nobody'); ?></option>
                <?php foreach ($ldap as $ldap) { ?>
                <option value='<?php echo $ldap['id']; ?>'><?php echo $ldap['nama_user']; ?></option>
                <?php } ?>
            </select>
       </div>

This code for jquery .

$(".select2").select2();

    $(".select2tag").select2({
        tags: true,
        maximumSelectionLength: 1
    });

    $(".select2tags").select2({
        tags: true
    });

This Function for call data with Medoo

    case "gemilang/add":
    $contacts = getTable("contacts");
    if($isAdmin) { $assets = getTable("assets"); } else { $assets = getTableFiltered("assets","clientid",$liu['clientid']); }
    $clients = getTable("clients");
    $cabang_gemilang = getTable("cabang_gemilang");
    $ldap = getTable("ldap");
    $admins = getTableFiltered("people","type","admin");
    if($isAdmin) { $users = getTableFiltered("people","type","user"); } else { $users = getTableFiltered("people","type","user","clientid",$liu['clientid']); }
    break;
riorio
  • 6,500
  • 7
  • 47
  • 100

0 Answers0