I see what you mean. Since this is a new area, I haven’t thought about that. I will revisit this and let you know for any solutions or at least a work-around if any.
Thank you very much @johnny
I will wait for your updates. Grocery CRUD has been very helpful for me in creating programs.
I hope you are always in good health.
I am very glad to announce you that at the latest version (3.0.16) we now have the ability to take the master_id at insert/update/clone forms.
A simple example of how to do that in the detailed CRUD is the below code:
$crud->fieldType('customerNumber', 'hidden');
$crud->callbackBeforeInsert(function ($stateParameters) {
if (!empty($_POST['master_id'])) {
if (is_numeric($_POST['master_id'])) {
$stateParameters->data['customerNumber'] = $_POST['master_id'];
} else {
throw new InvalidArgumentException("Invalid argument for the field 'master_id'");
}
}
return $stateParameters;
});
So basically you need to use the callbackBeforeInsert and make sure that you have the fieldType as hidden so the insert form will not filter it.
If you are using Composer then I have more good news for you since now we have moved to our private composer server. In short that means that you no longer need to download any zip file for update
sorry @johnny for late response
I am busy with another project using a different programming language, but I have tried it, and it works very well.
Thank you, Jonny, for your hard work.
If you don’t mind (I am adding this post publicly so maybe others may have some input) what language are you using? I was thinking to extend Grocery CRUD on other languages as well but with different architecture (e.g. having it in the cloud). Do you think that something like that would be beneficial for your projects?
Hello @johnny , and Happy New Year to you as well!
I am using ASP.NET Core with C#.
Certainly, if Grocery CRUD could be used with other languages, it would be very helpful for programmers.
Using Grocery CRUD allows me to focus on completing the business processes of the application without spending too much time implementing CRUD operations for each table in the database.
Thank you very much, @johnny , for your hard work