Hello @johnny , so i try to input data using GCE from slow internet. I fill the form, and click save 10 x. And it inserts data 10 x. It should be just inserted one times.
So my question is, how to prevent multiple times insert with gce ?
Hello @johnny , so i try to input data using GCE from slow internet. I fill the form, and click save 10 x. And it inserts data 10 x. It should be just inserted one times.
So my question is, how to prevent multiple times insert with gce ?
Hello @heruprambadi ,
I never thought about that to be honest. I think I should just disable the button “Insert” when you press the button. I will revisit it for the next version release and let you know.
Regards
Johnny
Yeah, i never thought about that too. But some of my clients still use very slow internet connection, and i just found the same data inserted by my client with just 1 sec time difference. From my experience, it caused by slow internet connection. So when they click save button, insert process is so slow and thats make they think they should click save button again to make it fast. And after that, multiple same data inserted.
Another reason is, they just accidentaly click save button twice. But it’s almost imposibble to click it twice from fast internet @johnny
hello @heruprambadi
i add this script in my default view to prevent that happen
in javascript tag
window.addEventListener('gcrud.form.add-load', () => {
setLoadingBtnGc();
});
window.addEventListener('gcrud.form.edit-load', ({
detail
}) => {
setLoadingBtnGc();
});
function setLoadingBtnGc() {
$('form[class^="gc-form-"]').submit(function() {
var form = $(this);
var button = form.find('button[type="submit"]');
var labelBefore = button.html();
button.prop('disabled', true);
button.html('<span class="fa fa-spinner"></span> Loading...');
enableButtonGcAgain(button,labelBefore);
return true;
});
}
function enableButtonGcAgain(button,labelBefore){
setTimeout(function() {
button.prop('disabled', false);
button.html(labelBefore);
}, 3000); // Adjust the timeout as needed (in milliseconds)
}
Finnaly.. i found slow internet and tested it. It works, i can use it on all my view. Thanks @nasrul
Thanks @nasrul for this. In the meantime, I have fixed this issue for the next version which hopefully will be released soon ![]()
hello @heruprambadi
Glad to hear that @heruprambadi
yes thank you so much @johnny
I am glad to announce you that this is now fixed on the latest version of Grocery CRUD (3.0.16)
If you are using Composer then I have 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 ![]()
For more you can check the blog post: Grocery CRUD Private Composer | Grocery CRUD Blog
Regards
Johnny
Woow that’s very good news. Now we don’t have to download and replace every update @johnny ![]()
| Topic | Replies | Views | Activity | |
|---|---|---|---|---|
| Use callbackColumn() but keep inline edit functionality |
|
3 | 649 | Apr 12 |
| callbackColumn() has not effect in v3.2.6 Enterprise |
|
2 | 696 | Dec 2025 |
| displayAs() doesn’t support new line in headings |
|
4 | 873 | Jan 5 |
| PRINT date format not consistent |
|
6 | 357 | Sep 7 |
| “Ooooops, something went wrong! If you can see this message, this is probably a misconfiguration in Grocery CRUD Enterprise!” |
|
6 | 266 | 8d |