Comments 1Tim Steeman started the conversationMay 22, 2022 at 1:42pmCan you tell me, what the name of the OK button is on the editform? I want to force a page reload on clicking on this button. Thank you for your help! Tim 2,572Aleksandar repliedMay 23, 2022 at 10:37amHello Tim.The ID of the table is mixed with the tableDescription.selector, so it's: $(document).on('click', tableDescription.selector + '_ok_edit_dialog', function (e) {In wp-content/plugins/wpdatatables/assets/js/wpdatatables/wpdatatables.js file.The class of the button is "wdt-ok-edit-button".I hope that helps.Kind Regards, Aleksandar Vuković[email protected] Rate my support wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community You can try wpDataTables add-ons before purchasing on these sandbox sites: Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables 1Tim Steeman repliedMay 23, 2022 at 5:58pmThanks Aleksandar,Can i call this event in the CSS of one particular Table?Kind regards,Tim 2,572Aleksandar repliedMay 24, 2022 at 12:22pmHi again TimThere's custom CSS section under "Customize" tab above every table (except for Simple tables), so you could include your custom CSS there, and it would apply only to that table.Kind Regards, Aleksandar Vuković[email protected] Rate my support wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community You can try wpDataTables add-ons before purchasing on these sandbox sites: Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables 1Tim Steeman repliedMay 29, 2022 at 5:47pmHi Aleksandar, If i put it in the custom CSS Section, the script would be... onclick(.wdt-ok-edit-button){window.location.reload();}or ....wdt-ok-edit-button.onclick{window.location.reload();}But that doesn't work, can you please give me another small hint?? Thanks for your help!! Tim 2,572Aleksandar repliedMay 30, 2022 at 11:52amHello again Tim.The custom JS can't go in the custom CSS field - it simply won't work.If you're adding custom JS, it needs to be applied either in wpDataTables settings/Custom JS and CSS/Custom JS section, or on the page.If you need help with adding custom JS to the page, please take a look at this article.Kind Regards, Aleksandar Vuković[email protected] Rate my support wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community You can try wpDataTables add-ons before purchasing on these sandbox sites: Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables 1Tim Steeman repliedJune 12, 2022 at 8:19pmHi Aleksandar,Thanks again for all your help.Last question, if i change wpdatatables.js like this; $(document).on('click', tableDescription.selector + '_ok_edit_dialog', function (e) { e.preventDefault(); e.stopImmediatePropagation(); e.preventDefault(); wpDataTablesFunctions[tableDescription.tableId].saveTableData(true, true); /** */location.reload(true); });That should do the job, or do i still not understand?? :-)with kind regards,Tim 2,572Aleksandar repliedJune 14, 2022 at 7:05amHey TimIt looks like this should work fine. Give it a go, purge all cache and disable the Minified JS in wpDataTables Settings/Custom JS and CSS tab.Let me know how it goes.Kind Regards, Aleksandar Vuković[email protected] Rate my support wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community You can try wpDataTables add-ons before purchasing on these sandbox sites: Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables Sign in to reply ...
Can you tell me, what the name of the OK button is on the editform?
I want to force a page reload on clicking on this button.
Thank you for your help!
Tim
Hello Tim.
The ID of the table is mixed with the tableDescription.selector, so it's:
In wp-content/plugins/wpdatatables/assets/js/wpdatatables/wpdatatables.js file.
The class of the button is "wdt-ok-edit-button".
I hope that helps.
Kind Regards,
Aleksandar Vuković
[email protected]
Rate my support
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community
You can try wpDataTables add-ons before purchasing on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables
Thanks Aleksandar,
Can i call this event in the CSS of one particular Table?
Kind regards,
Tim
Hi again Tim
There's custom CSS section under "Customize" tab above every table (except for Simple tables), so you could include your custom CSS there, and it would apply only to that table.
Kind Regards,
Aleksandar Vuković
[email protected]
Rate my support
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community
You can try wpDataTables add-ons before purchasing on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables
Hi Aleksandar,
If i put it in the custom CSS Section, the script would be...
onclick(.wdt-ok-edit-button){
window.location.reload();
}
or ...
.wdt-ok-edit-button.onclick
{
window.location.reload();
}
But that doesn't work, can you please give me another small hint??
Thanks for your help!!
Tim
Hello again Tim.
The custom JS can't go in the custom CSS field - it simply won't work.
If you're adding custom JS, it needs to be applied either in wpDataTables settings/Custom JS and CSS/Custom JS section, or on the page.
If you need help with adding custom JS to the page, please take a look at this article.
Kind Regards,
Aleksandar Vuković
[email protected]
Rate my support
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community
You can try wpDataTables add-ons before purchasing on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables
Hi Aleksandar,
Thanks again for all your help.
Last question, if i change wpdatatables.js like this;
$(document).on('click', tableDescription.selector + '_ok_edit_dialog', function (e) {
e.preventDefault();
e.stopImmediatePropagation();
e.preventDefault();
wpDataTablesFunctions[tableDescription.tableId].saveTableData(true, true);
/**
*/
location.reload(true);
});
That should do the job, or do i still not understand?? :-)
with kind regards,
Tim
Hey Tim
It looks like this should work fine. Give it a go, purge all cache and disable the Minified JS in wpDataTables Settings/Custom JS and CSS tab.
Let me know how it goes.
Kind Regards,
Aleksandar Vuković
[email protected]
Rate my support
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community
You can try wpDataTables add-ons before purchasing on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables