Jump to content


What's the best way to create a custom Add or Edit view?

views custom

  • Please log in to reply
1 reply to this topic

#1 jjwdesign

jjwdesign

    Member

  • Members
  • PipPip
  • 12 posts

Posted 08 December 2012 - 07:23 PM

I've been working with Grocery Crud for over a month now and I've found it extremely helpful. Most everything I've needed to modify has had a callback; with the great API documentation. Great work!

I've come across a situation where I need to create more customized Add and Edit views. I realize that one approach, would be to simply duplicate the entire theme folder with views, js, css, etc. But this seems a bit extreme. All I really want to override is the add.php view, located at /assets/grocery_crud/themes/datatables/views/add.php.

I noticed the add view is hardcoded in the grocery_crud.php library.

protected function showAddForm()

$this->_theme_view('add.php',$data);

What's the best approach to this problem?

Thank you,
Jeff Walters

#2 jjwdesign

jjwdesign

    Member

  • Members
  • PipPip
  • 12 posts

Posted 11 December 2012 - 02:04 AM

Answer: Just copy the theme and drastically modify the views to your needs :)





Also tagged with one or more of these keywords: views, custom

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users