It looks like you're new here. If you want to get involved, click one of these buttons!
Trainee name in Arabic
Comments
yes this is in an advanced module , model , form_fields function
fuel version is 1.3
{
//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;
}
https://github.com/daylightstudio/FUEL-CMS/commit/10b7c5ec28270b113fff4d26390fd750f12f5603