⚠ 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

Adding form instead of a grid



maksik

maksik
  • profile picture
  • Member

Posted 30 October 2013 - 07:12 AM

Hello!

 

Could you help me please. I need place adding form instead of datagrid on the first screen, but didn't found how to do that.

 

The only way to do it i see this one:

public function profile($page=null) {
    if ($page==null) redirect (APP_URL.'profile/add');
    else ...
}

Amit Shah

Amit Shah
  • profile picture
  • Member

Posted 30 October 2013 - 22:36 PM

Hi maksik

 

Welcome the GC Forums

Well there truely are ways for that 1 - What you need to do is use

if($crud->getState() == 'list') {
       (APP_URL.'profile/add')
}

But beware of how you play around - If you dont want list totally .. then u should disable the list by $crud->unset_list();

 

Happy GCing