Title: Disabling specific meta fields
Last modified: September 13, 2021

---

# Disabling specific meta fields

 *  Resolved [bcxdeveloper](https://wordpress.org/support/users/bcxdeveloper/)
 * (@bcxdeveloper)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/disabling-specific-meta-fields/)
 * I was using the hook below to filter out all the meta fields. Unfortunately I
   now need only one meta info field (Entry Date). Is there a hook that we can use
   to disable specific meta info fields so that I can include Entry Date?
 * Hook previously used:
    add_filter( ‘gfexcel_output_meta_info’, ‘__return_false’);
 * Resolved by using Default Enabled Meta Fields
    -  This topic was modified 4 years, 8 months ago by [bcxdeveloper](https://wordpress.org/support/users/bcxdeveloper/).

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [Doeke Norg](https://wordpress.org/support/users/doekenorg/)
 * (@doekenorg)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/disabling-specific-meta-fields/#post-14867986)
 * Hi [@bcxdeveloper](https://wordpress.org/support/users/bcxdeveloper/),
 * Glad you already have a solution. For what it’s worth, here is an alternative.
 * You can do it programmatically by using the `gfexcel_field_disable_meta` hook,
   and return `true` unless the `$field->id` equals the one you want to show. That
   way only that meta field is visible.
 * **Note that this only applies on the actual download, not the sorting table.**
 * For example:
 *     ```
       add_filter('gfexcel_field_disable_meta', function (bool $current_value, $field) {
           $visible_meta_fields = ['date_created'];
   
           return !in_array($field->id, $visible_meta_fields, true);
       });
       ```
   
 * So you can prevent the export of those fields this way, but not the ability to
   drag and drop them in the sorting tables.
 *  Thread Starter [bcxdeveloper](https://wordpress.org/support/users/bcxdeveloper/)
 * (@bcxdeveloper)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/disabling-specific-meta-fields/#post-14871804)
 * Excellent! This is exactly what I was looking for.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Disabling specific meta fields’ is closed to new replies.

 * ![](https://ps.w.org/gf-entries-in-excel/assets/icon.svg?rev=3434379)
 * [GravityExport Lite for Gravity Forms](https://wordpress.org/plugins/gf-entries-in-excel/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/gf-entries-in-excel/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/gf-entries-in-excel/)
 * [Active Topics](https://wordpress.org/support/plugin/gf-entries-in-excel/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/gf-entries-in-excel/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/gf-entries-in-excel/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [bcxdeveloper](https://wordpress.org/support/users/bcxdeveloper/)
 * Last activity: [4 years, 8 months ago](https://wordpress.org/support/topic/disabling-specific-meta-fields/#post-14871804)
 * Status: resolved