⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠

  •     

profile picture

Grocery crud hidden field and set relation didnt work together



Prince Hector
  • profile picture
  • Member

Posted 27 January 2016 - 06:58 AM

I have a problem with grocery crud hidden field and set relation .

My code is

$crud->set_relation('created_by','users','user_name'); 
$crud->edit_fields('title', 'description', 'created_by');
$crud->change_field_type('created_by', 'hidden', $this->user_id);

Here i want to store user_id as created by in hidden form. But problem is that created_by field is still visible in my view page. when I cut off set_relation then created_by field is hidden.Note that I have another field which is hidden by this change_field_type but only created_by field is not working when i use set_relation

 

What did i wrong  ? plz help me


Paul Savostin
  • profile picture
  • Member

Posted 05 February 2016 - 00:16 AM

So what is your problem? Why u need set created_by like hidden?

If you set field name in set_relation then hidden or invisible will not working!

So tell me your logic and mb i will help u :)