⚠ 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

New field types



slav123
  • profile picture
  • Member

Posted 14 February 2012 - 23:53 PM

I'm just wondering what is the best way to create new field type.
I would like to add new "relation" type and I want to replace standard select field with something different - whole code is in "libraries/grocery_crud.php" - it can't be extended without modifying source code?

web-johnny
  • profile picture
  • Administrator
  • 1,166 posts

Posted 15 February 2012 - 22:29 PM

You can create a MY_grocery_crud that extends the core grocery CRUD. An example of a similar thing (that extends grocery_Model) you can find at: http://www.grocerycr...ample-included/ . The same thing you can do it for grocery_CRUD library