Data table entry forms
4 min read
The kind Data table entry adds one row to a data table for every submission. It needs no post and no user, so it is the right choice for contact requests, newsletter signups, job applications, quotes and surveys.
It needs a data table first: see Create a data table. The kind is listed in The form only when your plan includes data tables (the Pro plan does). Without data tables the Data table card says "Your plan does not include data tables, so this form does not accept entries. Deactivate it or choose another kind."
Set it up
- Create the table with the columns the form should fill. Mark a column Required for what you must have, and Unique for what must not repeat (for example the email).
- Add form, The form › Data table entry.
- In the Data table card choose Add rows to: the table. Help: "Every submission adds one row to this table." With no table yet the card links to Create a data table.
- The Columns card lists the table's columns: "Choose the columns of the data table that the form shows. Each submission adds a row to the table." Untick the ones the form should not show (at least one stays on).
- Set Who can submit (default Anyone, including visitors), the messages and the optional email, then Create form.
The form needs the Forms feature and the Data tables feature. Without data tables visitors see nothing and administrators see "Your plan does not include data tables, so visitors do not see this form."
What a submission does
- The visitor's values go through the same checks as the row screen: each column's type, Required columns, unique values. The form never stores a blank where a value was refused; it shows the problem next to the field:
"Full name" is required."Email" does not accept this value.(a typed value the column refuses, for example text in a Number column or a malformed email address)
- Files are uploaded first (see File uploads); a bad file stops the whole submission before any row exists.
- The row is added. Its origin is recorded as a form, and the table's
wpmcf/data_tables/row_savedaction fires. - The optional email goes out; its link opens the row in the data table (
...#tables/{key}/rows/{id}). - The visitor sees your Success message (default "Thank you! Your entry has been received.") or is redirected.
A Password column is shown as a password box and stored as a hash.
Unique values
When a column is Unique and the visitor sends a value that already exists:
- a guest sees "Your entry could not be saved. Please try again later." (the form does not reveal which values exist);
- a logged-in user sees "A row with this value already exists."
Use a unique column when you want a signup to be sent only once, and handle the existing value on your side.
Which columns work
Columns with these types are shown: Text, Text area, Number, Range, Email, URL, Password, Color picker, Select, Radio buttons, Button group, True / false, Date, Date and time, Time, WYSIWYG editor, oEmbed, Image and File. Icon picker, Post object, Page link and Programmatic SEO page columns are marked Not available in forms and are never shown.
Everything else about the table
- Public columns are not needed: a form can fill any column of its table, public or not. The public setting only controls what the site may print; see Show rows on your site.
- Rows are only ever added. An entry form cannot change or delete a row.
- A table used by an entry form cannot be deleted; it shows
Form: Titlein Used by. - If the table is deleted anyway through the database or the columns no longer fit, visitors see nothing and administrators see "This form has no column it can show: its data table is missing or none of its columns works in forms."
- Row limits: there is none. Protect the form against floods with the rate limit.
Use the rows
- Read them under Data Tables (Entries tab) or export them.
- Show them on a page with a list, for example a public guest book.
- Use them as the data of Programmatic SEO.
Still stuck? Contact support