label_layout top option not working?

edited September 2011 in Bug Reports
Not sure if I'm doing this correctly but here are the lines with the label_layout calling for the top option:
$fields['user_name'] = array('label' => lang('form_label_username_email'), 'label_layout' => 'top', 'required' => TRUE); $fields['password'] = array('label' => lang('form_label_password'), 'type' => 'password', 'label_layout' => 'top', 'required' => TRUE);
It's set up to use the default of table rather than divs and I've cleared site and browser cache. Still being built with the labels to the left of the form fields. Am I doing something wrong or possibly leaving a piece out somewhere?

Comments

  • edited 9:43PM
    Figured it out. Didn't realize that this was an overall setting for the form itself. This fixed it for anyone else that might be confused:
    $fields['user_name'] = array('label' => lang('form_label_username_email'), 'required' => TRUE); $fields['password'] = array('label' => lang('form_label_password'), 'type' => 'password', 'required' => TRUE); $this->_CI->form_builder->label_layout = 'top';
    Of course, this isn't the entire form - there's a submit button, etc.
Sign In or Register to comment.