Welcome Guest, Not a member yet? Register   Sign In
Can't get set_select() to work
#7

[eluser]EddieX[/eluser]
An easy solution:

In controller:
Code:
...
$data['form_role'] = $_POST['role']; //If it exists
$this->load->view('admin/account_create', $data);

In view (account_create):
Code:
$roles = array();
foreach($available_roles as $role)
{
    $roles[$role['id']] = $role['name'];
}

$role_dropdown = form_dropdown('role', $roles, $form_role);

This solve the problem, but it should not be necessary to do it this way though.


Messages In This Thread
Can't get set_select() to work - by El Forum - 05-21-2009, 11:53 AM
Can't get set_select() to work - by El Forum - 05-21-2009, 12:05 PM
Can't get set_select() to work - by El Forum - 05-21-2009, 12:05 PM
Can't get set_select() to work - by El Forum - 05-21-2009, 12:30 PM
Can't get set_select() to work - by El Forum - 05-21-2009, 07:44 PM
Can't get set_select() to work - by El Forum - 05-22-2009, 03:37 AM
Can't get set_select() to work - by El Forum - 05-22-2009, 08:31 AM



Theme © iAndrew 2016 - Forum software by © MyBB