⚠ 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

How to Override showAddForm()



sebfrey

sebfrey
  • profile picture
  • Member

Posted 24 October 2018 - 13:08 PM

Hi!  Very very new to Grocery Crud, it's marvelous what it does out of the box, but for it to work for me I'm really going to need to have custom add/edit forms for most tables in my application. I have looked over the forums and seen some mention of this but have not seen a solution.

 

I see that the showAddForm() function for example loads "add.php" - but I would like to have it load a custom form, and I don't want to create a new theme for every table so I can have that theme's "add.php" file be used.  Can I override the showAddForm() function in a class that extends Grocery_CRUD or Grocery_CRUD_Layout, and if so, how might I do that?  :)

 

How are people using custom add / edit forms with Grocery CRUD?  Thanks in advance!