before_label doesn't work

edited February 2016 in Bug Reports
$fields["first_name"] = array("type"=>'','order'=>1,'required'=>TRUE , 'value'=>$name , 'size'=>10,'row_class'=>'trainee_row','before_label'=>'

Trainee name in Arabic

');
before label doesn't appear this html

Trainee name in Arabic

Comments

  • edited 10:27AM
    Is this for a module form? If so, what version of FUEL are you running? I'm not able to replicate the issue.
  • edited 10:27AM
    Thank you for your reply,
    yes this is in an advanced module , model , form_fields function
    fuel version is 1.3
  • edited 10:27AM
    What are you seeing instead for the label?
  • edited 10:27AM
    label appear normally which is "First name" and nothing appear before or after
  • edited 10:27AM
    Can you post your form_fields method?
  • edited 10:27AM
    function form_fields($values = array())
    {

    //var_dump($values);
    //exit();
    $name = '';
    $email = '';
    $username = '';
    $active = 'yes';
    $user_id = '';
    $pass_comment = '';
    $pass_req = TRUE;

    if(isset($values['user_id']) && $values['user_id']!='')
    {
    $this->db->select('id,CONCAT(fuel_users.first_name, " " , fuel_users.last_name) as name ,fuel_users.email , user_name , fuel_users.active ' , FALSE);
    $this->db->where('id',$values['user_id']);
    $data = $this->db->get("fuel_users")->result_array();
    $name = $data[0]['name'];
    $email = $data[0]['email'];
    $username = $data[0]['user_name'];
    $active = $data[0]['active'];
    $user_id = $data[0]['id'];
    $pass_comment = 'Leave it empty if you don\'t want to change password';
    $pass_req = FALSE;
    }
    $fields = parent::form_fields($values);

    $fields["first_name"] = array("type"=>'','order'=>1,'required'=>TRUE , 'value'=>$name , 'size'=>10,'row_class'=>'trainee_row','before_label'=>'

    Trainee name in Arabic

    ');
    $fields["father_name"] = array("type"=>'','order'=>2,'required'=>TRUE , 'value'=>$name, 'size'=>10,'row_class'=>'trainee_row');
    $fields["grand_father_name"] = array('size'=>10 , 'required'=>TRUE,'row_class'=>'trainee_row');
    $fields["family_name"] = array('size'=>10 , 'required'=>TRUE,'row_class'=>'trainee_row');
    $fields["first_name_en"] = array('size'=>10, 'row_class'=>'trainee_row','label'=>'First name');
    $fields["father_name_en"] = array('size'=>10, 'row_class'=>'trainee_row','label'=>'Father name');
    $fields["grand_father_name_en"] = array('size'=>10, 'row_class'=>'trainee_row','label'=>'Grand father name');
    $fields["family_name_en"] = array('size'=>10, 'row_class'=>'trainee_row','label'=>'Family name');

    $fields["email"] = array("type"=>'email','order'=>10,'required'=>TRUE, 'value'=>$email);
    $fields["username"] = array("type"=>'','order'=>8,'required'=>TRUE, 'value'=>$username);
    $fields["password"] = array("type"=>'','order'=>9,'required'=>$pass_req , 'comment'=>$pass_comment);
    $fields["active"] = array("type"=>'boolean','mode'=>'radios' , 'options'=>array('yes'=>'yes','no'=>'no'),'value'=>$active);
    $fields["slug"] = array("type"=>'hidden');
    //$fields["created"] = array("type"=>'hidden');
    $fields["user_id"] = array("type"=>'hidden' , 'value'=>$user_id);
    $fields["id_no"] = array("required"=>TRUE);
    $fields["mobile_no"] = array("required"=>TRUE);
    //exit();
    $this->form_builder->render_format = 'divs';
    $this->form_builder->css_class = 'trainees_form';

    return $fields;
    }
  • edited 10:27AM
    Thanks for posting that. It appears to be an issue with using the render_format = 'divs'; I've posted a fix under the develop and 1.4_dev branches:
    https://github.com/daylightstudio/FUEL-CMS/commit/10b7c5ec28270b113fff4d26390fd750f12f5603
  • edited 10:27AM
    Thanks for your effort and for your time
Sign In or Register to comment.