⚠ 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 27 Nov 2019
Offline Last Active Dec 05 2019 03:03 PM

Posts I've Made

In Topic: now showing data using if using variabel $crud->where()

02 December 2019 - 03:56 PM

Hello Johnny,


we use Grocery CRUD Enterprise and we had a simmilar issue with the $_POST / $_GET method.

After your suggestion we have passed our data using the $_GET method. This works perfect, but it has one disadvantage. All the data are shown in the link. (...project.php?ProjectNo_ID=4010...)

We have also tried to use $_POST and $_SESSION, but these two methods do not work in callbackAddForm or callbackAddField. Variables are in this case empty.


Working solution:

$crud->callbackAddForm(function ($data) {
    $data['ProjectNo'] = $_GET['ProjectNo_ID'];
    return $data;


Prefered solution (but unfortunately not working):

$crud->callbackAddForm(function ($data) {
    $data['ProjectNo'] = $_POST['ProjectNo_ID'];
    return $data;


Is there any way, how to pass the data from a form into AddForm without to show them in the link?


Thank you


Best regards