Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Doeke Norg

    (@doekenorg)

    Hi @rd4282, yes that’s probably possible. What plugin are you using for the approval?

    Thread Starter rd4282

    (@rd4282)

    I’m using Gravity View. Yes, Gravity View has a CSV export feature but it doesn’t work as well as yours.

    Plugin Author Doeke Norg

    (@doekenorg)

    Hi @rd4282, cool; I just needed to know because not every approval plugin works the same, and it isn’t a native feature.

    If you apply this to your functions.php you should be all set. This will filter down EVERY form. If you need a specific form just append the form id to the filter name like gfexcel_output_search_criteria_4 for form_id 4.

    // Filter down to only approved entries.
    add_filter('gfexcel_output_search_criteria', static function (array $search_criteria): array {
        $search_criteria['field_filters'][] = [
            'key' => 'is_approved',
            'value' => 1,
        ];
    
        return $search_criteria;
    });

    Please let me know if this helps you out.

    Thread Starter rd4282

    (@rd4282)

    Awesome! Worked perfectly.

    I confess…I didn’t know what ‘functions.php’ was until 30 minutes ago.

    Plugin Author Doeke Norg

    (@doekenorg)

    Learn something new everyday!

    Now that you’re a pro ?? you might want to take a look at https://gfexcel.com. There are some things you often have to reach for, and most work with these hooks in the functions.php. Have a look.

    Glad id worked out.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Display only approved entries?’ is closed to new replies.