How to disable the “Loading data” message
While a DataTables View fetches its entries, it shows a Loading data… message with three moving dots over the table. You can hide the message with one CSS rule, turn it off with PHP, or change its words.

When the message shows depends on the View’s processing mode. In Ajax (Server-side) mode, it shows while the table loads and each time the table asks the server for entries, for example after a visitor sorts a column. In Preloaded (Client-side) mode, it shows for a moment while the table sorts.
Hide the message with CSS #
A CSS rule in the View’s Custom CSS field hides the message in both processing modes:
- Edit your View.
- In the Settings box, click the Custom Code tab.
- Add this rule to the Custom CSS field:
VIEW_SELECTOR .dataTables_processing {
display: none !important;
}- Click Update.
GravityView replaces VIEW_SELECTOR with this View’s own selector, so other Views keep the message. Adding custom CSS to your Views explains the field and its placeholders.
To hide the message on every DataTables View, add this rule to your theme’s CSS instead:
.gv-datatables-container .dataTables_processing {
display: none !important;
}Turn the message off with PHP #
This snippet turns the message off on every DataTables View in Ajax (Server-side) mode:
/**
* Turns off the DataTables "Loading data…" message.
*
* @param array $dt_config The DataTables settings for the View.
* @param int $view_id The ID of the View.
*
* @return array The changed settings.
*/
add_filter( 'gravityview_datatables_js_options', function ( $dt_config, $view_id ) {
$dt_config['processing'] = false;
return $dt_config;
}, 10, 2 );Note: The PHP examples on this page go in your site’s code. See Where to put code samples.
The snippet has no effect on a View in Preloaded (Client-side) mode, which still shows the message when a visitor sorts. Use the CSS rule above for those Views.
To turn the message off on one View only, compare the View ID:
/**
* Turns off the DataTables "Loading data…" message on one View.
*
* @param array $dt_config The DataTables settings for the View.
* @param int $view_id The ID of the View.
*
* @return array The changed settings.
*/
add_filter( 'gravityview_datatables_js_options', function ( $dt_config, $view_id ) {
// Replace 123 with the ID of your View.
if ( 123 === (int) $view_id ) {
$dt_config['processing'] = false;
}
return $dt_config;
}, 10, 2 );Change the words #
To keep the message and change what it says, use the gravityview_datatables_loading_text filter. It works in both processing modes:
/**
* Changes the words of the DataTables "Loading data…" message.
*
* @param string $loading_text The message. Default: "Loading data…".
* @param \GV\View $view The View.
*
* @return string The new message.
*/
add_filter( 'gravityview_datatables_loading_text', function ( $loading_text, $view ) {
return 'Fetching the staff list…';
}, 10, 2 );