

Get in touch

Download Plugin Now
  • Follow
  • Follow
WP Data Access
  • Download
  • Support
  • Features
  • Pricing
  • Documentation
    • Tool Guide
    • App Builder
    • Data Explorer
    • SQL Query Builder
    • Plugin Settings
    • Legacy Tools
    • Remote Connections
a
M
  • Download
  • Support
  • Features
  • Pricing
  • Documentation
    • Tool Guide
    • App Builder
    • Data Explorer
    • SQL Query Builder
    • Plugin Settings
    • Legacy Tools
    • Remote Connections
Download Plugin Now

App Builder

  • Getting Started
  • App Builder Dashboard
  • Creating your first App
  • Running Apps
  • Export/Import Apps
  • Road Map
  • App Shortcodes
    • Shortcode Usage
    • Shortcode Parameters
    • URL Parameters

App Manager

  • Getting started
  • Supported App Types
  • Supported Languages
  • App Authorization and Access
  • Full-Screen Mode

Table Builder

  • Getting started
  • Relationships
  • Lookups
  • Computed Fields
  • Table
    • Global filter
    • Column filters
    • Bulk Actions
    • Row Actions
    • Column Actions
    • Default where
    • Default Order By
    • Pagination
    • Inline Editing Settings
    • Layout & Responsiveness
      • Responsiveness
      • Density
      • Table Header
      • Table Footer
  • Columns
    • Introduction
    • Column Settings
    • Column Actions
    • Lookup
    • Aggregations
    • Column Metadata
  • Performance
    • Large Table Support
    • Server/Client-Side Processing
  • Filters
    • Global filter
    • Column filters
    • Default where
    • URL parameters
    • Shortcode parameters

Form Builder

  • Getting started
  • Relationships
  • Lookups
  • Computed Fields
  • Form
    • Understanding the Grid
    • Field Layout
    • Column Behaviour
    • Null Value Handling
  • Columns
    • Column Settings
    • Validation
    • Lookup
    • Column Metadata
  • Layout & Behaviour
    • Grid Positioning

Map Builder

  • Getting started
  • Map Builder
  • Creating a map
  • Using maps

Chart Builder

  • Getting started
  • Creating a chart
  • Using charts

Hooks

  • Getting started with hooks
  • App Hooks
    • global
    • onAppOpen
    • onAppClose
  • Table Hooks
    • customActionsTop
    • customActionsBottom
    • postQuery
    • renderDetailPanel
    • Table Column Hooks
      • render
  • Form Hooks
    • customActionsBottom
    • onRowInit
    • preFormSubmit
    • postFormSubmit
    • Form Column Hooks
      • onBlur
      • onChange
      • onClick
      • onDoubleClick
      • onFocus
      • onKeyDown
      • onKeyUp
  • Built-Ins
    • Overview
    • wpda.log
    • wpda.alert
    • wpda.confirm
    • wpda.snackbar
  • Dynamic Permission Control
    • Client-Side
    • Server-Side
  • Examples
    • Reload page after form submission
    • Display specific columns in detail panel
    • Auto-reload table at specific intervals
    • Adding SEO links to table
    • Styling fields with setColumnStyle
    • Hide empty table column
    • Replicate data entered on field into another field

Layout & Styling

  • Fonts
  • Palette
  • Layout
  • Manual Styling (CSS)

Demos

  • Classic Models
  • Student Administration System
  • Data Table

Tutorials

  • Creating a Data Table App
  • Creating a Data Management App
View Categories

Display specific columns in detail panel

For specific table columns (no Computed Fields) #

The code snippet below renders the detail panel for selected columns only. Thanks to one of our customers, Tony, for letting us publish this example!

Using the renderDetailPanel hook (available in the Table Builder) #

((columnValues, table) => {

// Define the exact LABELS you want to include
const includeLabels = ["Book Title", "Book Author"];

// Filter column keys based on their label values
const MyColumns = Object.keys(columnValues).filter(columnName =>
includeLabels.includes(columnValues[columnName].label)
);

const columnElements = MyColumns.map(columnName =>

`<div class="panel-column">
<div class="label">${columnValues[columnName].label}</div>
<div class="content">${columnValues[columnName].renderedValue}</div>
</div>`
);

return `
<div class="my-custom-detail-panel">
${columnElements.join("")}
</div>

<style>
.my-custom-detail-panel {
margin: 0;
padding: 2rem;
display: grid;
grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
gap: 0.25rem;
}

.my-custom-detail-panel .panel-column {
display: grid;
grid-template-columns: 2fr 4fr;
align-items: start;
gap: 0.5rem;
}

.my-custom-detail-panel .panel-column .label {
text-align: right;
white-space: nowrap;
overflow: visible;
direction: rtl;
}

.my-custom-detail-panel .panel-column .content {
font-weight: bold;

}
</style>
`
})
Defining the final list of columns to display uses the filter() array method. To learn more, please visit: Array.prototype.filter() – JavaScript

For excluding table columns while also displaying Computed Fields #

Example of a renderDetailPanel hook that returns all columns except the 8th column #

((columnValues, table) => {
  // Variable log contains a reference to the built-in logger.
  // Variable columnValues contains all column labels, original values and rendered values.

  // Use built-in logger to view columns on console.
  // wpda.log.info(columnValues)
  
  // Define a final list of columns to display
  const MyColumns = Object.keys(columnValues).slice(0,7);

  // Create an HTML element for each column. Elements are added to the template below.
  const columnElements = MyColumns.map(columnName => 
    `<div class="panel-column">
      <div class="label">${columnValues[columnName].label}</div>
      <div class="content">${columnValues[columnName].renderedValue}</div>
    </div>`
  )

  // Return template
  // This example template contains all detail panel CSS. CSS can also be defined outside the template.
  return `
    <div class="my-custom-detail-panel">
      ${columnElements.join("")}
    </div>
    
    <style>
      .my-custom-detail-panel {
        margin: 0;
        padding: 2rem;
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
        gap: 0.25rem;
      }

      .my-custom-detail-panel .panel-column {
        display: grid;
        grid-template-columns: 2fr 4fr;
        align-items: start;
        gap: 0.5rem;
      }
      
      .my-custom-detail-panel .panel-column .label {
        text-align: right;
        white-space: no-wrap;
        overflow: visible;
        direction: rtl;
      }

      .my-custom-detail-panel .panel-column .content {
        font-weight: bold;
      }
    </style>
  `
})

Defining the final list of columns to display uses the slice() array method. To learn more, please visit: Array.prototype.slice() – JavaScript

Example of a renderDetailPanel hook that returns all columns except two consecutive columns at position 13 and 14 #

((columnValues, table) => {
  // Variable log contains a reference to the built-in logger.
  // Variable columnValues contains all column labels, original values and rendered values.

  // Use built-in logger to view columns on console.
  // wpda.log.info(columnValues)
  
  // Define a final list of columns to display
  const MyColumns = Object.keys(columnValues).splice(12, 2);

  // Create an HTML element for each column. Elements are added to the template below.
  const columnElements = MyColumns.map(columnName => 
    `<div class="panel-column">
      <div class="label">${columnValues[columnName].label}</div>
      <div class="content">${columnValues[columnName].renderedValue}</div>
    </div>`
  )

  // Return template
  // This example template contains all detail panel CSS. CSS can also be defined outside the template.
  return `
    <div class="my-custom-detail-panel">
      ${columnElements.join("")}
    </div>
    
    <style>
      .my-custom-detail-panel {
        margin: 0;
        padding: 2rem;
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
        gap: 0.25rem;
      }

      .my-custom-detail-panel .panel-column {
        display: grid;
        grid-template-columns: 2fr 4fr;
        align-items: start;
        gap: 0.5rem;
      }
      
      .my-custom-detail-panel .panel-column .label {
        text-align: right;
        white-space: no-wrap;
        overflow: visible;
        direction: rtl;
      }

      .my-custom-detail-panel .panel-column .content {
        font-weight: bold;
      }
    </style>
  `
})

Defining the final list of columns to display uses the splice() array method. To learn more, please visit: Array.prototype.splice() – JavaScript

Share This Article :
  • Facebook
  • X
  • LinkedIn
  • Pinterest
Still stuck? How can we help?

How can we help?

Updated on 2025-06-17
Reload page after form submissionAuto-reload table at specific intervals

Submit a Comment Cancel reply

Your email address will not be published. Required fields are marked *

Table of Contents
  • For specific table columns (no Computed Fields)
    • Using the renderDetailPanel hook (available in the Table Builder)
  • For excluding table columns while also displaying Computed Fields
    • Example of a renderDetailPanel hook that returns all columns except the 8th column
    • Example of a renderDetailPanel hook that returns all columns except two consecutive columns at position 13 and 14
WP Data Access
  • Follow
  • Follow
Links
$

Imprint

$

Privacy policy

$

Cookie policy

Get in touch
$

Contact us

$

Free support forum

$

Premium support

Resources


WordPress plugin directory



YouTube tutorials

Copyright © 2025 | All Right Reserves

Manage Consent
To provide the best experiences, we use technologies like cookies to store and/or access device information. Consenting to these technologies will allow us to process data such as browsing behavior or unique IDs on this site. Not consenting or withdrawing consent, may adversely affect certain features and functions.
Functional Always active
The technical storage or access is strictly necessary for the legitimate purpose of enabling the use of a specific service explicitly requested by the subscriber or user, or for the sole purpose of carrying out the transmission of a communication over an electronic communications network.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
The technical storage or access that is used exclusively for statistical purposes. The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
The technical storage or access is required to create user profiles to send advertising, or to track the user on a website or across several websites for similar marketing purposes.
Manage options Manage services Manage {vendor_count} vendors Read more about these purposes
View preferences
{title} {title} {title}