We need dynamic predefined values. We want to set values in input forms dynamically. For example the username or a date or something else. This predefined value is not for every user and case the same.
You can add %VAR1% as a predefined editing value for the columns.
Also, you can use any of the other placeholders there. For example - in the date column, you can use %CURRENT_DATETIME% placeholder, and the current datetime will be stored as the predefined editing value.
My advice would be to hide that column from the edit modal with custom CSS, and also remove the "Apply and add new" and "Prev" and "Next" buttons, since the predefined values will be deleted if someone clicks on those.
We need dynamic predefined values. We want to set values in input forms dynamically. For example the username or a date or something else. This predefined value is not for every user and case the same.
Is it possible with JS or something else?
Thanks a lot.
Hello Raphael
Thank you for your purchase.
If you're using server-side tables (manual, imported or SQL Query based tables), you can use placeholders as search and replace values.
The placeholders can be replaced through the query, or through shortcodes.
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 for your reply. I use SQL Query based tables. I don't mean a placeholder in the query. I mean a default value in the input form: https://wpdatatables.com/wp-content/uploads/2015/05/front-end-overview-1-1024x489.png
For example we want to add different dates per user as default value in the field "Exam date".
Hello again Raphael
You can add %VAR1% as a predefined editing value for the columns.
Also, you can use any of the other placeholders there. For example - in the date column, you can use %CURRENT_DATETIME% placeholder, and the current datetime will be stored as the predefined editing value.
My advice would be to hide that column from the edit modal with custom CSS, and also remove the "Apply and add new" and "Prev" and "Next" buttons, since the predefined values will be deleted if someone clicks on those.
You can see how to do that here:
https://wpdatatables.com/faqmd/how-to-hide-apply-and-add-new-next-and-prev-buttons-from-the-edit-modal/
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