⚠ In case you've missed it we are migrating 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 forum is read-only and soon will be archived. ⚠


Member Since 11 Jul 2012
Offline Last Active Mar 27 2013 12:07 PM

Posts I've Made

In Topic: Same relation to display two columns from another table

28 January 2013 - 08:17 AM


In Topic: How to stop grocery crud cutting from string fields in list view

24 January 2013 - 08:05 AM


$config['grocery_crud_character_limiter'] = 0;

In Topic: Callback_before_insert is not working in a dabase relation.

22 November 2012 - 08:42 PM

You can only modify the $post_array using callback_before_insert. So it's not very useful in this case...

You need the prefix 'callback_' before your actual function name in set_rules(), like this:
$crud->set_rules('officeCode', 'Office City','callback_officeCode_check');
Then this should work:

function officeCode_check($str)
     $num_row = //My query here;
     if ($num_row >= 1)
         $message = $this->lang->line('is_unique');
         $message = sprintf($message, 'Office City');
         $this->form_validation->set_message('officeCode_check', $message);
         return FALSE;
         return TRUE;

Also, you'll have to load the form_validation library before using it.

In Topic: How to use datepicker month and years only??

21 November 2012 - 07:15 AM

You could integrate this into your project manually or code the functionality into the GC library yourself...

In Topic: Unsigned number field bug

02 November 2012 - 08:52 AM

Ok, it seems the problem was a little different.
The "backspace not working in Opera" bug is caused by the jQuery numeric plugin...
It seems it doesn't like Opera much when detecting special keys...