select list not show in my form
Permalink 2 users found helpful
Hi
single pages.php
controller.php
the output i attached the file pfa...
how to solve this?
single pages.php
controller.php
Loader::model('employeeinfo'); $rArr = employeeinfo::get(); $this->set('role',$rArr);
the output i attached the file pfa...
how to solve this?
Hi rony
If i create a array manually is working properly
my coding
$arr = Array ('kumar', 'Kamal', 'Chandru');
$this->set('Arole',$arr);
<td><?php echo $form->select('eRole', $Arole); ?></td>
and also i attached o/p PFA
Now how to solve my previous question
my updated this line
I try to convert the dataset to array
<td><?php echo $form->select('eRole', $abc); ?></td>
Warning: Invalid argument supplied for foreach() in /home/kumar/public_html/amsConcrete/concrete/core/helpers/form.php on line 347
Thanks
If i create a array manually is working properly
my coding
$arr = Array ('kumar', 'Kamal', 'Chandru');
$this->set('Arole',$arr);
<td><?php echo $form->select('eRole', $Arole); ?></td>
and also i attached o/p PFA
Now how to solve my previous question
my updated this line
I try to convert the dataset to array
Loader::model('employeeinfo'); $rArr = employeeinfo::get(); $rol = array(); foreach($rArr as $w){ echo "<pre>".($w['role_name'])."</pre>";//o/p: Admin Jr. Enginner Sr. Enginner $rol .= $w['role_name']; } echo "<pre>"; print_r($rol);//o/p: ArrayAdminJr. EnginnerSr. Enginner echo "</pre>"; $this->set('abc',$rol);//
<td><?php echo $form->select('eRole', $abc); ?></td>
Warning: Invalid argument supplied for foreach() in /home/kumar/public_html/amsConcrete/concrete/core/helpers/form.php on line 347
Thanks
I think the array should be in key=>value combination.
Rony
Rony
I dnot know about the key=>value, how to solve this?
I got the result.
the helpers/form donot accept the dataset value, so the dataset value to convert the array and pass the parameter of select('eRole', $role). its work properly.
following this code
Single Page.php
Controllers.php
thanks rony after your comment i have workout again and again. I get the idea.
thanks
Kumar
the helpers/form donot accept the dataset value, so the dataset value to convert the array and pass the parameter of select('eRole', $role). its work properly.
following this code
Single Page.php
Controllers.php
Loader::model('employeeinfo'); $role = employeeinfo::get(); $rolearr[] = "------------"; foreach($role as $temp){ $rolearr[] = $temp['role_name']; } $this->set('role', $rolearr);
thanks rony after your comment i have workout again and again. I get the idea.
thanks
Kumar
Rony