Hi John and everyone,
after long lurking time, i decided to join the forum to improve my understanding of Grocery CRUD and help others with my experience.
My first question is :
How to use gestState correctly ?
In the community version i can set rules depending of the state like this example:
$state = $crud->getState();
if ($state == 'add') {
$crud->required_fields('customerName','contactLastName');
} else if ($state == 'edit') {
$crud->required_fields('customerName');
}
but in the Enterprise version it doesn't seem to work with this example:
$state = $crud->getState();
if ($state == 'AddForm') {
$crud->requiredFields(['customerName','contactLastName']);
} else if ($state == 'EditForm') {
$crud->requiredFields(['customerName']);
}
The states are recognized but the rules are not working.
Anyone know how to solve this ?
Thank you all !