WP Data Access > Data Explorer > Manage > Settings > Column Settings
- Column labels
- Column types (images, audio, video, attachments, hyperlinks)
- Inline editing (edit table data in an Excel like manner)
Column Labels #
Column labels are automatically used throughout the plugin in all list tables and data entry forms (Data Explorer, Data Tables and Data Projects). Within Data Tables and Data Projects column labels can be overwritten.
There are two types of column labels:
- Column labels for list tables
- Column labels for data entry forms
Column Types #
WordPress Media Library integration #
The plugin supports WordPress media library integration for column types:
- Attachment
- Audio
- Hyperlink
- Image
- Image URL
- Video
These columns will be handle as media columns throughout the plugin, including list tables, data entry forms, Data Tables pages and Data Project pages.
Attachments #
Attachment columns can store any media from your WordPress media library. In a list table an attachment is shown as a link to the associated file. Media can be added in a data entry form in edit mode. In view mode the attachment is shown as a hyperlink.
Audio #
Audio columns can only store audio from your WordPress media library. The plugin generates an audio shortcode for this type of media in list tables. Audio can be added in a data entry form in edit mode. In view mode an audio shortcode is added to the form.
Hyperlink #
Stores a static hyperlink in JSON or TEXT format (see Table Settings for more information). The hyperlink can be entered in the data entry form of the table and is shown as a hyperlink in list tables and data tables.
Image #
Image columns can only store images from your WordPress media library. The plugin generates an img tag for this type of media in list tables. Images can be added in a data entry form in edit mode. In view mode, an img tag is added to the form.
Image URL #
Stores a static image URL. The URL can be entered in the data entry form of the table and is shown as an image in list tables and data tables.
Video #
Video columns can only store video from your WordPress media library. The plugin generates a video shortcode for this type of media in list tables. Video can be added in a data entry form in edit mode. In view mode, a video shortcode is added to the form.
Multiple and single media columns #
The plugin supports multiple as well as single media columns:
- NUMBER columns are handled as single media columns
- VARCHAR columns are handled as multiple media columns
Single media columns can only save only one media id. Multiple media columns can save as many media IDs as you like. The width of your char column determines the maximum number of IDs that can be stored. Make sure your column is wide enough!
Column format examples #
- column “bike_photo bigint(20) unsigned” can store one image or attachment
- column “bike_attachments varchar(200)” can store multiple images or attachments until there is no more space left
Notes #
- The association with the WordPress media library will only work within the plugin!
- Data entry for media columns is only available within the WordPress dashboard. Shortcode usage on web pages offers support for WordPress media columns in list tables only.
An line example of a data table using WordPress media library integration for an Attachment and an Image column is shown below.
Brand | Brand Type | Color | Photo | Attachments | Price | Licence Plate | Category | Fuel Type | Mileage | Engine Capacity | No Cylinders |
---|---|---|---|---|---|---|---|---|---|---|---|
Brand | Brand Type | Color | Photo | Attachments | Price | Licence Plate | Category | Fuel Type | Mileage | Engine Capacity | No Cylinders |
Inline editing #
Inline editing is a premium feature that allows users to edit table data in an Excel-like manner. Adding inline editing to a table column is as simple as enabling the “Edit” checkbox as shown on the image below (click to enlarge). How inline editing is handled depends on the column type.
Inline editing example #
Inline editing – text and numeric columns #
These column types are handled as normal text and numeric columns. The input item contains an icon to save and an icon to revert changes (see images below). A numeric check is performed for numeric columns.
Inline editing – date and time columns #
Date and time columns can be entered using the date time picker which is available for data entry forms as well.
Inline editing – checkboxes #
Like in plugin data entry forms, columns of data type tinyint(1) are converted to a checkbox, which provides a natural enable/disable user interface.
Inline editing – drop-down lists #
Columns of data type enum are converted to drop-down lists (see column Gender in example below). Columns of data type set are converted to drop-down lists that allow multiple selections (see column Multilist in example below).
Inline editing – lookups (Data Projects only) #
When inline editing is enabled on a lookup column in a Data Project, the plugin automatically generates a listbox for the lookup column.
Inline editing limitations #
- Inline editing is not available for tables that have no primary or unique key.
- Inline editing is not supported for primary key columns. If a table has no primary key, this rule applies to the unique key which is being used for data manipulation.
- Inline editing is not supported for WordPress media library columns.
- Inline editing works on existing rows only. It cannot be used to add new rows to a table.
Is it possible to set our primary key to auto-increment? If so, how can we achieve this?
Hi Necmi,
Yes, that’s possible.
When you’re creating a new table using our Data Designer, you may can add the “auto_increment” in the Extra field. For example: https://share.zight.com/eDubKxXp
Hope that helps! Let us know if you have other questions.
Is there any inline edit meta-control for reordering rows that have a display_pos numeric field (not the key field), ideally something like the drag and drop interface used when reordering a WP menu?
Hi Jeffh,
It’s unavailable in the Data Explorer, but when you create data table apps from your database tables, you can reorder columns via drag and drop.
You can read more about it here: https://wpdataaccess.com/docs/columns/introduction-app-table-columns/
Hope it helps! Let us know if you have other questions.
Thanks, but I’m actually looking to use the control to update records, not column order in an App. I have records that the user needs in an order that does not lend itself to alphabetic or other simple ORDER BY clauses, so I resorted to including a display_pos field for use in the ORDER BY. When new rows are added, they may require the records to be reordered. It’s tedious to go through many records to increment the value in the display_pos field to make room for the new list member.
I was really hoping that the column order control that you use in the Table Builder is something that could be leveraged to update application records as well.
Hi Jeffh, thanks for the clarification and apologies for the confusion! That is currently not possible, but I will add this to Peter’s Feature Request list for him to consider.
Let us know if you have other questions.
Thank you. And to be clear, if Peter thinks this use case is worth adding a control, I am open to other ways, beyond having a display_pos column, of storing record order. I thought about implementing a link list, with each record having a field that contains the key that should follow it, or adding a separate table that contains the ordering data for the various ordered tables, and then select for the table and use the result in an ORDER BY FIELD() clause.
Hi Jeffh,
Thanks for the additional input! I’ve added this idea to Peter’s feature request for him to revisit after the planned additions to App Builder is complete.
Feel free to message us via our Contact page if you have more questions and ideas.