ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

v 1.3.3 grocery CRUD - an automatic Codeigniter CRUD

April 11, 2011 3:24am

Subscribe [77]
  • #271 / Jan 31, 2012 3:41pm

    web-johnny

    235 posts

    I’ve been using Grocery Crud for the past couple of months and have to say it’s amazing. The developer did a great job and it not only does the job well but also looks great visually.

    Thanks a lot for your hard work!

    Let me know if I can help.

    Thanks @fdias . This is actually a great post! Similar posts are usually just a beginning phrase of ... BUT I have this problem e.t.c. e.t.c.

    I really appreciate it.

    Thanks

  • #272 / Feb 03, 2012 11:18am

    ReyPM

    86 posts

    I’m working with n-n relationship and get this error:

    Error Number: 1452
    Cannot add or update a child row: a foreign key constraint fails (`nominas`.`asignaciones_has_ntrabajadores`, CONSTRAINT `Ref_07` FOREIGN KEY (`idasignacion`) REFERENCES `asignaciones` (`idasignacion`) ON DELETE NO ACTION ON UPDATE NO ACTION)
    INSERT INTO `asignaciones_has_ntrabajadores` (`idasignacion`, `idtrabajador`) VALUES (12, '6')

    Any advice or help on this?

    Also it’s possible to use group_by here?

  • #273 / Feb 04, 2012 3:24am

    rtan

    5 posts

    Hi,

    I would like your suggestion regarding including jquery stepy for editing the contents, I have more than 50 fields to edit and need to break them in part preferably with fieldset.

    Please advise.

    regards.

  • #274 / Feb 09, 2012 4:49pm

    yepwingtim

    3 posts

    Is it possible to have a actual checkbox layout rather than the bloated two table multi check interface thing?

  • #275 / Feb 11, 2012 5:40am

    web-johnny

    235 posts

    Is it possible to have a actual checkbox layout rather than the bloated two table multi check interface thing?

    No this is not able till now. I have change the interface though at the new version 1.1.8 now it’s much more interesting. Have a look of the attached image.

  • #276 / Feb 11, 2012 8:21am

    MatthewSchenker

    58 posts

    Hi web-johnny,
    I’ve been working with GroceryCRUD a bit more.

    How do we use the CodeIgniter form helper with GroceryCRUD?  Is this possible?

    Thanks,
    Matthew

  • #277 / Feb 11, 2012 8:09pm

    goFrendiAsgard

    125 posts

    I think there is no way doing that, since groceryCRUD has it’s own form (but I don’t exactly know :D).
    If you want to validate the data, you might use callback

  • #278 / Feb 12, 2012 9:44am

    web-johnny

    235 posts

    Hi web-johnny,
    I’ve been working with GroceryCRUD a bit more.

    How do we use the CodeIgniter form helper with GroceryCRUD?  Is this possible?

    Thanks,
    Matthew

    Thank you goFrendiAsgard for your answer and yes you are right.
    The only way to actually use the form_helper is with the callback_add_field and callback_edit_field. But to tell you the truth I don’t understand why and where to use form_helper for grocery CRUD. An example of using a form helper could be:

    function example_callback_add_field(){
        $this->grocery_crud->set_table('offices');
        $this->grocery_crud->set_subject('Office');
        $this->grocery_crud->required_fields('city');
        $this->grocery_crud->columns('city','country','phone','addressLine1','postalCode');
     
        $this->grocery_crud->callback_add_field('phone',array($this,'add_field_callback_1'));
     
        $output = $this->grocery_crud->render();
     
        $this->_example_output($output);
    }
     
    function add_field_callback_1()
    {
        $this->load->helper('form');
        return '+30 '.form_input('phone', '');
    }

    But I don’t really understand what are you looking for.

  • #279 / Feb 12, 2012 1:38pm

    MatthewSchenker

    58 posts

    Hello web-johnny,
    As always, thanks for your great answers!

    I’ve been trying various CRUD methods in CodeIgniter, and Grocery CRUD is definitely terrific.  Most of the methods I am reading about involve using the Form Helper.  Just for comparison, I was wondering about Grocery CRUD with this.

    Do you think it’s easier and more powerful to just use Grocery CRUD callbacks instead of the CI Form Helper?

    Thanks again,
    Matthew

  • #280 / Feb 12, 2012 3:39pm

    the_unforgiven

    588 posts

    It works well with 2.1.0 and using since Friday this week what a great piece save lots of time, thanks @web-johnny

  • #281 / Feb 12, 2012 5:20pm

    web-johnny

    235 posts

    Hello web-johnny,
    As always, thanks for your great answers!

    I’ve been trying various CRUD methods in CodeIgniter, and Grocery CRUD is definitely terrific.  Most of the methods I am reading about involve using the Form Helper.  Just for comparison, I was wondering about Grocery CRUD with this.

    Do you think it’s easier and more powerful to just use Grocery CRUD callbacks instead of the CI Form Helper?

    Thanks again,
    Matthew

    I totally believe that it’s more powerful by NOT using form_helper. The good thing about grocery CRUD is that time after time its getting more stable as it uses less and less code from CI .
    This is very useful for futures updates. For example even if major changes will be in Codeigniter , grocery CRUD is still stable and update-able without any problem. That’s the secret that is still compatible with 1.7.x 😉
    The callbacks are pretty cool idea and I will try to have more documentation, so users can use them easily without any doubt.

  • #282 / Feb 26, 2012 4:04am

    Pieter

    34 posts

    Hello web-johnny,

    Wow, I just discovered Grocery CRUD. It looks great!
    I have one question about relations. Is it possible to use set_relation() when the name of the field isn’t the same. Example:

    Table Users:
    —————-
    id
    username
    password


    Table Profiles:
    ——————
    id
    user_id
    first_name
    last_name


    Can I relate the “id” field from the Users table with “user_id” field from the Profiles table?
    (It’s an existing project so renaming “id” to “user_id” is a bit difficult).
    Thanks.

  • #283 / Feb 26, 2012 6:46pm

    web-johnny

    235 posts

    Yes of course without any problem.
    You can do this with the simple set_relation so in your case you will have:

    $c = new grocery_CRUD();
    
    $c->set_table('profiles');
    
    $c->set_relation('user_id','users','username');

    The field “id” of the Users table is auto-recognized as it is the primary key of the related table.

  • #284 / Feb 29, 2012 6:08am

    Pieter

    34 posts

    @web-johnny
    Thanks! I’ve been playing with Grocery CRUD for a while and it’s just awesome!

  • #285 / Mar 01, 2012 3:46pm

    MatthewSchenker

    58 posts

    I totally believe that it’s more powerful by NOT using form_helper….
    The callbacks are pretty cool idea and I will try to have more documentation, so users can use them easily without any doubt.

    Thanks web-johnny!

    When I build my forms, I need to do a lot of the options that are available in the CodeIgniter form helper.

    I may be wrong, I don’t see all the form helper options available in GroceryCRUD?  Is this true?  It might just be a documentation issue.

    Sorry if I’m asking obvious questions!

    Thanks,
    Matthew

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases