What I want to know is which filter I should use to validate data in insert and update process before save the data in the database.
ej: when some field must not have a repeated value. So I have to check it before save in database and in addition, it will be great if I could give to the user an alert message about why.
A warning displayed while in the edit modal is not built in the plugin's features. So, there's no way of restricting the user from entering the same value twice.
There may be a workaround for this, but I'd need a more detailed explanation of what values should be present in the table, how they would be used, and how implemented, so I can understand better what you're trying to achieve.
We already figure this out with the filter wpdatatables_filter_formdata_before_save.
Add in this function filter a field formData['msg']=message; your core could you check if there is a field 'msg' before insert or update and do nothing, just show the message.
Could be very nice feature for futures upgrade and it just take a few lines of code.
I will forward this to our development team, so they can either insert it in our Filters page, or find a way to implement it in the built-in version of the plugin for one of our future releases.
We carefully follow customers requirements and try to implement most of them if they appear in requests from time to time, so we will add to our idea list and look into some possible solutions on plugin side in the future.
What I want to know is which filter I should use to validate data in insert and update process before save the data in the database.
ej: when some field must not have a repeated value. So I have to check it before save in database and in addition, it will be great if I could give to the user an alert message about why.
Regards
Alejandro
Hello Alejandro.
A warning displayed while in the edit modal is not built in the plugin's features. So, there's no way of restricting the user from entering the same value twice.
There may be a workaround for this, but I'd need a more detailed explanation of what values should be present in the table, how they would be used, and how implemented, so I can understand better what you're trying to achieve.
Best regards.
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
We already figure this out with the filter wpdatatables_filter_formdata_before_save.
Add in this function filter a field formData['msg']=message; your core could you check if there is a field 'msg' before insert or update and do nothing, just show the message.
Could be very nice feature for futures upgrade and it just take a few lines of code.
Regards
Alejandro
Good news, Alejandro.
Thanks for letting me know.
I will forward this to our development team, so they can either insert it in our Filters page, or find a way to implement it in the built-in version of the plugin for one of our future releases.
Thank you.
Best regards.
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
It will be grate if you add in your filter page something like.... check if the val alredy exist for fields that the user select.
Alejandro.
Thank you for your suggestion, Alejandro.
We carefully follow customers requirements and try to implement most of them if they appear in requests from time to time, so we will add to our idea list and look into some possible solutions on plugin side in the future.
Best regards.
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