Table of Contents
How to use hidden (dynamic) columns in wpDataTables
Say your team logs requests in an editable table on the front end, and you need to know who added each request and when, without asking people to type their name and the date. A hidden (dynamic) column fills in a value by itself when someone adds a row: the logged-in user, the current date, a placeholder value, data from the post the table is on, or an Advanced Custom Fields value. The column stays hidden from visitors and can’t be edited by hand. It works only in manual tables.
How do I create a hidden column?
Add a new column to a manual table, set its Type to Hidden (Dynamic) and choose which value fills it. You choose this type when you add the column. An existing column can’t be changed to it, so add a new one instead.
- Open the manual table. Go to wpDataTables → wpDataTables and click the table title.
- Add a column. Click Add column above the preview and type the column name.
- Choose the type. Set Type to Hidden (Dynamic). The Dynamic editor predefined value list appears, with Current User ID selected by default.
- Choose the value. In Dynamic editor predefined value, choose what fills the column, for example Current User Display Name.
- Add and save. Confirm the new column, then click Save Changes.

From now on, every new row gets the value automatically. The column doesn’t appear in the edit form, because nobody fills it in. To check the values, show the column in the back end with Visible on front-end or in Column List, as described in How to show and hide columns.
Which values can fill a hidden column?
The list has five groups of values:
| Group | Values |
|---|---|
| Current user | Current User ID, Display Name, First Name, Last Name, Email, Login and IP Address of the user who adds or edits the row. |
| Current date and time | Current Date, Current Datetime and Current Time, when the row is saved. |
| Placeholders | %VAR1% to %VAR9%, with the value from the shortcode or the default in the table’s Placeholders tab. Read Table placeholders. |
| Post data | Post ID, Post Title, Post Author ID, Post Type, Post Status, Post Parent ID and Post URL of the page that shows the table, plus Post Meta Value as string and ACF Data. Filled only when the row is added on the front end; post meta is saved as text. |
| HTTP data | HTTP User Agent, HTTP Refer URL and Query Parameter (GET) of the visitor’s request. |
How do I fill a column from an Advanced Custom Fields value?
Choose ACF Data, enter the field key, and add the table to the page that has the field. Say each movie page has ACF fields title, genre and year, and a manual table on the page collects reviews:
- Add the hidden columns. Create hidden columns for title, genre and year, each with ACF Data and the field key, for example title.
- Keep one editable column. Give at least one other column an editor input type, for example One-line edit for the review, so visitors can add rows.
- Add the table to the movie page. Paste the table shortcode into the page with the ACF fields.
When a visitor adds a review, the form shows only the review field, and the hidden columns save the title, genre and year of that movie.
What should I remember about hidden columns?
Add a new column to a manual table with the type Hidden (Dynamic) and pick a Dynamic editor predefined value, such as the current user, the date, a placeholder, post data or an ACF field. The column fills in by itself for every new row, stays hidden and can’t be edited, and post data works only for rows added on the front end.
Where can I read more?
These pages cover manual tables and editing: