Here my problem is i have a form . In that i have dependent dropdown. for example if i select company name it automatically selects the dependent company email and company p
Finally i found answer, actually mistake was mine, because here am using getting records based on company_id but here i have used approvaldetails table id so that is the mistake, after i changed it to company_id, now its working good
public function actionLists2($id)
{
$countEmployeedetails = Employeedetails::find()
->where(['company_id' => $id])
->count();
$employeedetails = Employeedetails::find()
->where(['company_id' => $id])
->all();
if($countEmployeedetails >= 0)
{
foreach($employeedetails as $employee)
{
// $arr["id"] . '-' . $arr['designation']
echo "";
}
}
else{
echo "";
}
}