Jump to content


Jefer

Member Since 30 Jul 2013
Offline Last Active Feb 17 2014 06:29 PM
-----

Topics I've Started

trim rule doesn't work

25 October 2013 - 05:40 PM

I am using trim function in a controller so login field can't contain whitespaces at the end but It doesn't work. The login is saved with white spaces.

 

here is the code.

        $crud = new grocery_CRUD();
 
	$crud->set_table('users');
	$crud->set_subject('Usuario');
	$crud->columns('login','password','admin');
	$crud->fields('login','password','admin');
	$crud->display_as('login','Usuario');
	
	$crud->set_rules('login','Usuario','trim|required');
	$crud->set_rules('password','Clave','required');

what is wrong? or do I have to use a callback?


put the action buttons in first column

30 July 2013 - 03:18 PM

I've been using Grocery Crud for about 5 months and I am very happy with it. However, I need to know if it is possible to put the action buttons (edit, delete buttons) in the table's first column. I am using flexigrid theme.

 

Thanks in advance.