19

I keep trying to setup a notification when a form is submitted but I'm not getting the emails. When I go back in to edit the notification, it is not there. It's like it is not saving that. Then I noticed this on the notifications page: function WP_List_Table::get_columns() must be over-ridden in a sub-class. Any idea what that means?

Note: It is saving the submissions in the entries area of the plugin.

ansarob
  • 825
  • 2
  • 13
  • 32

6 Answers6

48

There is a simple fix for this without upgrading Gravity Forms, but you'd have to edit a plugin file for Gravity Forms.

in notification.php, in the class

GFNotificationTable extends WP_List_Table { ...

Add this method:

    function get_columns() {
        $columns = array(
                'name' => 'Name',
                'subject' => 'Subject'
                );
        return $columns;
    }

The same solution can be applied to any plugin where you're seeing this problem. The columns array just needs to match the names set as $this->_column_headers.

SunWuKong
  • 601
  • 4
  • 3
  • 1
    Please note that the answer below is also relevant to fixing the issue. You should also add the above function to the file: `form_settings.php` inside `class GFConfirmationTable extends WP_List_table { ...` – hitautodestruct Jul 18 '16 at 07:08
41

Adding to the previous answer, to fully fix the problem you'll need to also place that same function:

function get_columns() {
        $columns = array(
                'name' => 'Name',
                'subject' => 'Subject'
                );
        return $columns;
    }

In the GF form_settings.php file under the class GFConfirmationTable extends WP_List_Table.

The first fixes the Notifications error and this fixes the Confirmations error.

Ahmed Ashour
  • 5,179
  • 10
  • 35
  • 56
Todd
  • 411
  • 3
  • 2
  • Thanks for sharing! I didn't want to upgrade my Gravity forms license for such a simple fix/problem that I strongly feel Gravity should of offered as a free upgrade patch release or at the least, they should of offered an instructional post like this Q&A did! – JasonDavis Oct 24 '15 at 01:09
4

I figured it out. Once I put the license key into the settings, I was able to download the update. Installed and the error went away.

ansarob
  • 825
  • 2
  • 13
  • 32
3

You also have to add it to: class GFAddOnFeedsTable extends WP_List_Table of file "class-gf-feed-addon.php" in includes/addons folder in order for add ons to work.

function get_columns() {
    $columns = array(
            'name' => 'Name',
            'subject' => 'Subject'
            );
    return $columns;
}
Yann P
  • 31
  • 1
1

You have to try this code inside wp-admin/includes/class-wp-list-table.php

Copy and paste this code inside the function public function get_columns() at line 872.

$columns = array(
'name' => 'Name',
'subject' => 'Subject'
);
return $columns;
Kevin Andrid
  • 1,963
  • 1
  • 15
  • 26
-2

I have tried this code snippet and it worked!

function get_columns() {
    $columns = array(
            'name' => 'Name',
            'subject' => 'Subject'
            );
    return $columns;
}
eestrada
  • 1,575
  • 14
  • 24
Fares Younis
  • 59
  • 1
  • 6
  • This needs some further explanation to be useful. How would the OP apply this to their given problem? – eestrada Dec 05 '15 at 01:48