How I can Add Records to a table which picks data from one other table.
For example there are two tables, emp_table and salary_table.
When i add a new record in salary_table the pop_up FORM should have a combo box listing all the employee from the emp_table.
Please refer the demos/appearence/dropdown.php
It lookup client name from clients table.
$col = array();
$col["name"] = "client_id";
$col["edittype"] = "select"; // render as select
# fetch data from database, with alias k for key, v for value
$str = $g->get_dropdown_values("select distinct client_id as k, name as v from clients");
$col["editoptions"] = array("value"=>":;".$str);
$col["formatter"] = "select"; // display label, not value
$cols = $col;
We are sorry that this post was not useful for you!
Let us improve this post!
Tell us how we can improve this post?