To enable tagging, you can set the type of grid edit control to autocomplete with set_col_edittype(), and set the LAST parameter to true.
In the demo below, edit Office Code in the pop-up form to see the tagging feature.
1 2 3 4 5 6 7 8 9 | // Always include namespace and conf.php on TOP of the script. use phpCtrl\C_DataGrid; require_once("/file/path/to/conf.php"); $dg = new C_DataGrid("select employeeNumber, lastName, firstName, isActive, officeCode, extension from employees", "employeeNumber", "employees"); $dg -> enable_edit("FORM", "CRUD"); $dg -> set_col_edittype("officeCode", "autocomplete", "Select officeCode,city from offices",true); $dg -> enable_search(true); $dg -> display(); |