Tag Archives: Combobox


Enable combobox. It is disabled by default. By default, PHP Autocomplete only allows value from existing options in the dropdown. When combobox is enabled, new value can be added to the selection.


public function enable_combobox(bool $enable = true )


  • $enable: true or false

Combo Box

PHP Autocomplete has combo box built-in. Combo box is a combination of drop-down list and text box. Users can either type a value directly into the text box or choose from a list of existing options.

Combo box feature is not enabled by default. To enable combobox, call enable_combobox() and set parameter to true. Note that the $data definition has the same definition as the previous examples.

$pac_cb = new C_PhpAutocomplete('combobox', $data);
<input id="combobox" type="hidden" />