function list_items($limit = NULL, $offset = NULL, $col = 'name', $order = 'asc', $just_count = FALSE)
{
$this->db->join('table1', 'table1.email = table.email', 'left')
->join('table2','table2.email=table.email','left');
$this->db->select('*', FALSE);
$data = parent::list_items($limit, $offset, $col, $order, $just_count);
return $data;
}
function form_fields($values = array(), $related = array())
{
$fields = parent::form_fields($values, $related);
// ******************* ADD CUSTOM FORM STUFF HERE *******************
// $fields['content']['img_folder'] = 'images/articles/';
//$fields['image']['folder'] = 'images/articles/';
//$fields['thumb_image']['folder'] = 'images/articles/thumbs/';
return $fields;
}
now i want to show data->content in different tables in form_fields according to my design but i didn't understand how to do .
i want to add some html here so please provide me good solution.
Comments
http://docs.getfuelcms.com/general/forms
function form_fields($values = array(), $related = array())
{
$fields = parent::form_fields($values, $related);
$this->db->join('examdata', 'appuser.email = examdata.email', 'left')
->join('certdata','certdata.email=examdata.email','left')
->where('email','abc@gmail.com');
$this->db->select('*', FALSE);
$data = parent::list_items($limit, $offset, $col, $order, $just_count);
$this->load->library('form_builder');
$this->form_builder->load_custom_fields(APPPATH.'config/custom_fields.php');
$fields['passion']=$data->passion;
return $fields;
}
actually i want to show passion value in the $fields['passion'].
$fields['passion'] = array('type' => 'custom', 'value' => $data->passion);
it's working perfectly
< pre>
echo "< table>"."< caption>user data< /caption>"."< tr>"."< td>".$fields['name']=$data[$i]['name'];."< /td>"."< /tr>".
."< tr>"."< td>".$fields['email']=$data[$i]['email'];."< /td>"."< /tr>".
."< tr>"."< td>".$fields['age']=$data[$i]['age'];."< /td>"."< /tr>".
."< tr>"."< td>".$fields['gender']=$data[$i]['gender'];."< /td>"."< /tr>"."";
< /pre>
http://docs.getfuelcms.com/general/forms#template