For the username, you can use our placeholder %CURRENT_USER_LOGIN% as a predefined value for the column, but if you hit "Apply and add new", that predefined value will be lost, so my advice would be to remove that with some custom CSS, like explained on this link.
As for the timestamp:
1. Create a column and name it "Updated" for example
2. In Column Settings, set the data to be DateTime
EDITING - None
3. Go to your database, and find this table (you can see the database table name in the Editing tab above the table). There,run this query:
ALTER TABLE `table_name` CHANGE `updated` `updated` DATETIME NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
When adding a row to a table or modifying a field, is there a way to auto-populate username and timestamp fields?
Hello Cecille
Thank you for your purchase.
For the username, you can use our placeholder %CURRENT_USER_LOGIN% as a predefined value for the column, but if you hit "Apply and add new", that predefined value will be lost, so my advice would be to remove that with some custom CSS, like explained on this link.
As for the timestamp:
1. Create a column and name it "Updated" for example
2. In Column Settings, set the data to be DateTime EDITING - None
3. Go to your database, and find this table (you can see the database table name in the Editing tab above the table). There,run this query:
That's it.
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