In add page, I want to set a value of field to the value set through the link parameter and when set the value it should invoke the autofill to update the remaining fields depended on it.
For example,
My Lookup field name is : Emp_no , I have set up autofill for fields name, age, department
In add page, I am using a link parameter empno to set the filtered value when the add page gets loaded,
function Lookup_Selecting($fld, &$filter) {
if ( $this->PageID == "add" ) {
if ($fld->FldName == "Emp_no") {
ew_AddFilter($filter, "Emp_no = " . $_GET['empno]);
}
}
}
Selecting the lookup value in Row_rendered
function Row_Rendered() {
if ( $this->PageID == "add" ) {
$this->Emp_no->EditValue = $_GET['empno];
}
}
The problem is, the filed Emp_no is loading the value set through the parameter however the values of name, age, department are not getting auto filled properly.
How to fix this problem? Please help