Hi all,
I am new to GrooceryCrud and I need your help. I have installed GC successfully and testing the basic functionality with my database tables.
I have a problem when adding a new entry. The form validation seems to not work. I have tried all 3 themes (datatables, flexigrid, bootstrap) and I encounter the same
problem. When editing, the validation works for flexigrid and bootstrap, but not for datatables theme.
I have tried just the $crud->required_fields, and when the required field is empty, NO red box appears, NO message appears. Just the page remains with the blank text box.
At the same time, I noticed the following error that appears in the Console (Developer tools of Firefox)
ReferenceError: form_error_message is not defined flexigrid-add.js:84:7
.success() flexigrid-add.js:84
a.fn.ajaxSubmit/b.success() jquery.form.min.js:7
m.Callbacks/j() jquery-1.11.1.min.js:2
m.Callbacks/k.fireWith() jquery-1.11.1.min.js:2
x() jquery-1.11.1.min.js:4
.send/b() jquery-1.11.1.min.js:4
(See also attached file)
I have tried to use also the:
$crud->set_rules('groupName','Group Name','required');
but no difference,
Below is the Controller function:
----------
public function citrusGroups()
{
try{
$crud = new grocery_CRUD();
$crud->set_theme('datatables');
$crud->set_table('V2_CitrusGroups');
$crud->set_subject('Citrus Group');
$crud->required_fields('groupName');
$crud->set_rules('groupName','Group Name','required');
$crud->columns('groupName','notes','webNotes');
$crud->display_as('groupName','Group Name');
$crud->display_as('notes','Notes');
$crud->display_as('webNotes','Web Notes');
$output = $crud->render();
$this->_example_output($output);
}catch(Exception $e){
show_error($e->getMessage().' --- '.$e->getTraceAsString());
}
}
----------
I would really appreciate any help/comment. I want so much to use the GC but this issue is an obstacle for me.
Best regards,
Anna