Home / Admin / ACF – Gravity View
Duplicate Snippet

Embed Snippet on Your Site

ACF – Gravity View

ismail daugherty PRO
<10
Code Preview
php
<?php
/**
 * WPCode Snippet: GravityView Views ACF Fields
 * Description: Registers ACF fields for GravityView configurations and settings
 * Location: Run Everywhere
 * Priority: 10
 */
defined( 'ABSPATH' ) || exit;
add_action( 'acf/init', function() {
    if ( ! function_exists( 'acf_add_local_field_group' ) ) {
        return;
    }
    acf_add_local_field_group( array(
        'key' => 'group_gv_views_sync_meta',
        'title' => 'GravityView Configuration',
        'fields' => array(
            // ==========================================
            // TAB 1: VIEW OVERVIEW & LINKS
            // ==========================================
            array(
                'key' => 'field_tab_view_overview',
                'label' => 'View Overview & Links',
                'name' => '',
                'type' => 'tab',
                'instructions' => '',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '',
                    'class' => '',
                    'id' => '',
                ),
                'placement' => 'top',
                'endpoint' => 0,
            ),
            
            // Quick Access Links Row
            array(
                'key' => 'field_gv_view_edit_link',
                'label' => '🔗 Edit View',
                'name' => 'gv_view_edit_link',
                'type' => 'url',
                'instructions' => 'Direct link to edit this view in GravityView admin',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '25',
                    'class' => '',
                    'id' => '',
                ),
                'default_value' => '',
                'placeholder' => '',
                'prepend' => '',
                'append' => '',
                'maxlength' => '',
                'readonly' => 1,
            ),
            array(
                'key' => 'field_gv_multiple_entries_edit_link',
                'label' => '📋 Edit Multiple Entries Layout',
                'name' => 'gv_multiple_entries_edit_link',
                'type' => 'url',
                'instructions' => 'Direct link to edit Multiple Entries layout',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '25',
                    'class' => '',
                    'id' => '',
                ),
                'default_value' => '',
                'placeholder' => '',
                'prepend' => '',
                'append' => '',
                'maxlength' => '',
                'readonly' => 1,
            ),
            array(
                'key' => 'field_gv_single_entry_edit_link',
                'label' => '📄 Edit Single Entry Layout',
                'name' => 'gv_single_entry_edit_link',
                'type' => 'url',
                'instructions' => 'Direct link to edit Single Entry layout',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '25',
                    'class' => '',
                    'id' => '',
                ),
                'default_value' => '',
                'placeholder' => '',
                'prepend' => '',
                'append' => '',
                'maxlength' => '',
                'readonly' => 1,
            ),
            array(
                'key' => 'field_gv_edit_entry_edit_link',
                'label' => '✏️ Edit Entry Form Layout',
                'name' => 'gv_edit_entry_edit_link',
                'type' => 'url',
                'instructions' => 'Direct link to edit Edit Entry layout',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '25',
                    'class' => '',
                    'id' => '',
                ),
                'default_value' => '',
                'placeholder' => '',
                'prepend' => '',
                'append' => '',
                'maxlength' => '',
                'readonly' => 1,
            ),
            
            // Basic View Info
            array(
                'key' => 'field_gv_view_id',
                'label' => 'View ID',
                'name' => 'view_id',
                'type' => 'number',
                'instructions' => '',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '20',
                    'class' => '',
                    'id' => '',
                ),
                'default_value' => '',
                'placeholder' => '',
                'prepend' => '',
                'append' => '',
                'min' => '',
                'max' => '',
                'step' => '',
                'readonly' => 1,
            ),
            array(
                'key' => 'field_gv_view_slug',
                'label' => 'View Slug',
                'name' => 'view_slug',
                'type' => 'text',
                'instructions' => '',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '20',
                    'class' => '',
                    'id' => '',
                ),
                'default_value' => '',
                'placeholder' => '',
                'prepend' => '',
                'append' => '',
                'maxlength' => '',
                'readonly' => 1,
            ),
            array(
                'key' => 'field_gv_view_status',
                'label' => 'Status',
                'name' => 'view_status',
                'type' => 'select',
                'instructions' => '',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '20',
                    'class' => '',
                    'id' => '',
                ),
                'choices' => array(
                    'active' => 'Active',
                    'inactive' => 'Inactive',
                    'trash' => 'Trash',
                ),
                'default_value' => false,
                'allow_null' => 0,
                'multiple' => 0,
                'ui' => 0,
                'return_format' => 'value',
                'ajax' => 0,
                'placeholder' => '',
                'disabled' => 1,
                'readonly' => 1,
            ),
            array(
                'key' => 'field_gv_view_type',
                'label' => 'View Type',
                'name' => 'view_type',
                'type' => 'select',
                'instructions' => '',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '20',
                    'class' => '',
                    'id' => '',
                ),
                'choices' => array(
                    'table' => 'Table',
                    'list' => 'List',
                    'map' => 'Map',
                    'calendar' => 'Calendar',
                    'datatables' => 'DataTables',
                    'diy' => 'DIY Layout',
                ),
                'default_value' => false,
                'allow_null' => 0,
                'multiple' => 0,
                'ui' => 0,
                'return_format' => 'value',
                'ajax' => 0,
                'placeholder' => '',
                'disabled' => 1,
                'readonly' => 1,
            ),
            array(
                'key' => 'field_gv_entry_count',
                'label' => 'Entry Count',
                'name' => 'entry_count',
                'type' => 'number',
                'instructions' => '',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '20',
                    'class' => '',
                    'id' => '',
                ),
                'default_value' => 0,
                'placeholder' => '',
                'prepend' => '',
                'append' => '',
                'min' => '',
                'max' => '',
                'step' => '',
                'readonly' => 1,
            ),
            
            // Additional Overview Fields
            array(
                'key' => 'field_gv_view_preview_link',
                'label' => 'Preview Link',
                'name' => 'gv_view_preview_link',
                'type' => 'url',
                'instructions' => 'Frontend preview URL',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '50',
                    'class' => '',
                    'id' => '',
                ),
                'default_value' => '',
                'placeholder' => '',
                'prepend' => '',
                'append' => '',
                'maxlength' => '',
                'readonly' => 1,
            ),
            array(
                'key' => 'field_gv_view_shortcode',
                'label' => 'View Shortcode',
                'name' => 'view_shortcode',
                'type' => 'text',
                'instructions' => 'Copy this shortcode to embed the view',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '50',
                    'class' => '',
                    'id' => '',
                ),
                'default_value' => '',
                'placeholder' => '',
                'prepend' => '',
                'append' => '',
                'maxlength' => '',
                'readonly' => 1,
            ),
            array(
                'key' => 'field_gv_date_created',
                'label' => 'Date Created',
                'name' => 'date_created',
                'type' => 'text',
                'instructions' => '',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '50',
                    'class' => '',
                    'id' => '',
                ),
                'default_value' => '',
                'placeholder' => '',
                'prepend' => '',
                'append' => '',
                'maxlength' => '',
                'readonly' => 1,
            ),
            array(
                'key' => 'field_gv_date_modified',
                'label' => 'Date Modified',
                'name' => 'date_modified',
                'type' => 'text',
                'instructions' => '',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '50',
                    'class' => '',
                    'id' => '',
                ),
                'default_value' => '',
                'placeholder' => '',
                'prepend' => '',
                'append' => '',
                'maxlength' => '',
                'readonly' => 1,
            ),
            
            // ==========================================
            // TAB 2: FORM CONNECTIONS
            // ==========================================
            array(
                'key' => 'field_tab_form_connections',
                'label' => 'Form Connections',
                'name' => '',
                'type' => 'tab',
                'instructions' => '',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '',
                    'class' => '',
                    'id' => '',
                ),
                'placement' => 'top',
                'endpoint' => 0,
            ),
            
            array(
                'key' => 'field_gv_primary_form_id',
                'label' => 'Primary Form ID',
                'name' => 'primary_form_id',
                'type' => 'number',
                'instructions' => '',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '33',
                    'class' => '',
                    'id' => '',
                ),
                'default_value' => '',
                'placeholder' => '',
                'prepend' => '',
                'append' => '',
                'min' => '',
                'max' => '',
                'step' => '',
                'readonly' => 1,
            ),
            array(
                'key' => 'field_gv_primary_form_title',
                'label' => 'Primary Form Title',
                'name' => 'primary_form_title',
                'type' => 'text',
                'instructions' => '',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '33',
                    'class' => '',
                    'id' => '',
                ),
                'default_value' => '',
                'placeholder' => '',
                'prepend' => '',
                'append' => '',
                'maxlength' => '',
                'readonly' => 1,
            ),
            array(
                'key' => 'field_gv_primary_form_edit_link',
                'label' => 'Edit Primary Form',
                'name' => 'primary_form_edit_link',
                'type' => 'url',
                'instructions' => '',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '34',
                    'class' => '',
                    'id' => '',
                ),
                'default_value' => '',
                'placeholder' => '',
                'prepend' => '',
                'append' => '',
                'maxlength' => '',
                'readonly' => 1,
            ),
            array(
                'key' => 'field_gv_multiple_forms_enabled',
                'label' => 'Multiple Forms Extension',
                'name' => 'multiple_forms_enabled',
                'type' => 'true_false',
                'instructions' => 'Is this view using Multiple Forms extension?',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '50',
                    'class' => '',
                    'id' => '',
                ),
                'message' => '',
                'default_value' => 0,
                'ui' => 1,
                'ui_on_text' => 'Enabled',
                'ui_off_text' => 'Disabled',
                'readonly' => 1,
            ),
            array(
                'key' => 'field_gv_strict_entry_match',
                'label' => 'Strict Entry Match',
                'name' => 'strict_entry_match',
                'type' => 'true_false',
                'instructions' => 'Inner join (strict) vs Left join (all from primary)',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '50',
                    'class' => '',
                    'id' => '',
                ),
                'message' => '',
                'default_value' => 0,
                'ui' => 1,
                'ui_on_text' => 'Inner Join',
                'ui_off_text' => 'Left Join',
                'readonly' => 1,
            ),
            array(
                'key' => 'field_gv_connected_forms_list',
                'label' => 'Connected Forms Details',
                'name' => 'connected_forms_list',
                'type' => 'textarea',
                'instructions' => 'All connected forms with their IDs, titles, and roles in the view',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '',
                    'class' => '',
                    'id' => '',
                ),
                'default_value' => '',
                'placeholder' => '',
                'maxlength' => '',
                'rows' => 8,
                'new_lines' => '',
                'readonly' => 1,
            ),
            array(
                'key' => 'field_gv_join_conditions_list',
                'label' => 'Join Conditions',
                'name' => 'join_conditions_list',
                'type' => 'textarea',
                'instructions' => 'Field mappings and join conditions between forms',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '',
                    'class' => '',
                    'id' => '',
                ),
                'default_value' => '',
                'placeholder' => '',
                'maxlength' => '',
                'rows' => 8,
                'new_lines' => '',
                'readonly' => 1,
            ),
            
            // ==========================================
            // TAB 3: LAYOUT & FIELDS CONFIGURATION
            // ==========================================
            array(
                'key' => 'field_tab_layout_fields',
                'label' => 'Layout & Fields',
                'name' => '',
                'type' => 'tab',
                'instructions' => '',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '',
                    'class' => '',
                    'id' => '',
                ),
                'placement' => 'top',
                'endpoint' => 0,
            ),
            
            array(
                'key' => 'field_gv_multiple_entries_fields_list',
                'label' => 'Multiple Entries Fields',
                'name' => 'multiple_entries_fields_list',
                'type' => 'textarea',
                'instructions' => 'Fields displayed in the directory/list view',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '',
                    'class' => '',
                    'id' => '',
                ),
                'default_value' => '',
                'placeholder' => '',
                'maxlength' => '',
                'rows' => 10,
                'new_lines' => '',
                'readonly' => 1,
            ),
            array(
                'key' => 'field_gv_single_entry_fields_list',
                'label' => 'Single Entry Fields',
                'name' => 'single_entry_fields_list',
                'type' => 'textarea',
                'instructions' => 'Fields displayed when viewing a single entry',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '',
                    'class' => '',
                    'id' => '',
                ),
                'default_value' => '',
                'placeholder' => '',
                'maxlength' => '',
                'rows' => 10,
                'new_lines' => '',
                'readonly' => 1,
            ),
            array(
                'key' => 'field_gv_edit_entry_fields_list',
                'label' => 'Edit Entry Fields',
                'name' => 'edit_entry_fields_list',
                'type' => 'textarea',
                'instructions' => 'Fields available for editing',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '',
                    'class' => '',
                    'id' => '',
                ),
                'default_value' => '',
                'placeholder' => '',
                'maxlength' => '',
                'rows' => 10,
                'new_lines' => '',
                'readonly' => 1,
            ),
            array(
                'key' => 'field_gv_field_mappings_details',
                'label' => 'Field Mappings & Configuration',
                'name' => 'field_mappings_details',
                'type' => 'textarea',
                'instructions' => 'Complete field configurations with labels, positions, visibility settings',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '',
                    'class' => '',
                    'id' => '',
                ),
                'default_value' => '',
                'placeholder' => '',
                'maxlength' => '',
                'rows' => 10,
                'new_lines' => '',
                'readonly' => 1,
            ),
            array(
                'key' => 'field_gv_widgets_top_list',
                'label' => 'Top Widgets',
                'name' => 'widgets_top_list',
                'type' => 'textarea',
                'instructions' => 'Widgets displayed at the top (search bar, pagination info, etc)',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '50',
                    'class' => '',
                    'id' => '',
                ),
                'default_value' => '',
                'placeholder' => '',
                'maxlength' => '',
                'rows' => 6,
                'new_lines' => '',
                'readonly' => 1,
            ),
            array(
                'key' => 'field_gv_widgets_bottom_list',
                'label' => 'Bottom Widgets',
                'name' => 'widgets_bottom_list',
                'type' => 'textarea',
                'instructions' => 'Widgets displayed at the bottom',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '50',
                    'class' => '',
                    'id' => '',
                ),
                'default_value' => '',
                'placeholder' => '',
                'maxlength' => '',
                'rows' => 6,
                'new_lines' => '',
                'readonly' => 1,
            ),
            array(
                'key' => 'field_gv_custom_content_fields',
                'label' => 'Custom Content Fields',
                'name' => 'custom_content_fields',
                'type' => 'textarea',
                'instructions' => 'Custom content blocks with HTML/shortcodes',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '',
                    'class' => '',
                    'id' => '',
                ),
                'default_value' => '',
                'placeholder' => '',
                'maxlength' => '',
                'rows' => 8,
                'new_lines' => '',
                'readonly' => 1,
            ),
            
            // ==========================================
            // TAB 4: FILTER & SORT SETTINGS
            // ==========================================
            array(
                'key' => 'field_tab_filter_sort',
                'label' => 'Filter & Sort',
                'name' => '',
                'type' => 'tab',
                'instructions' => '',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '',
                    'class' => '',
                    'id' => '',
                ),
                'placement' => 'top',
                'endpoint' => 0,
            ),
            
            array(
                'key' => 'field_gv_filter_enabled',
                'label' => 'Filter Enabled',
                'name' => 'filter_enabled',
                'type' => 'true_false',
                'instructions' => '',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '25',
                    'class' => '',
                    'id' => '',
                ),
                'message' => '',
                'default_value' => 0,
                'ui' => 1,
                'ui_on_text' => 'Yes',
                'ui_off_text' => 'No',
                'readonly' => 1,
            ),
            array(
                'key' => 'field_gv_advanced_filter_enabled',
                'label' => 'Advanced Filter',
                'name' => 'advanced_filter_enabled',
                'type' => 'true_false',
                'instructions' => '',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '25',
                    'class' => '',
                    'id' => '',
                ),
                'message' => '',
                'default_value' => 0,
                'ui' => 1,
                'ui_on_text' => 'Enabled',
                'ui_off_text' => 'Disabled',
                'readonly' => 1,
            ),
            array(
                'key' => 'field_gv_filter_by_user',
                'label' => 'Filter by User',
                'name' => 'filter_by_user',
                'type' => 'true_false',
                'instructions' => 'Show only logged-in user entries',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '25',
                    'class' => '',
                    'id' => '',
                ),
                'message' => '',
                'default_value' => 0,
                'ui' => 1,
                'ui_on_text' => 'Yes',
                'ui_off_text' => 'No',
                'readonly' => 1,
            ),
            array(
                'key' => 'field_gv_filter_approval_status',
                'label' => 'Approval Filter',
                'name' => 'filter_approval_status',
                'type' => 'select',
                'instructions' => '',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '25',
                    'class' => '',
                    'id' => '',
                ),
                'choices' => array(
                    'all' => 'All Entries',
                    'approved' => 'Approved Only',
                    'unapproved' => 'Unapproved Only',
                ),
                'default_value' => 'all',
                'allow_null' => 0,
                'multiple' => 0,
                'ui' => 0,
                'return_format' => 'value',
                'ajax' => 0,
                'placeholder' => '',
                'disabled' => 1,
                'readonly' => 1,
            ),
            array(
                'key' => 'field_gv_advanced_filter_rules_list',
                'label' => 'Advanced Filter Rules',
                'name' => 'advanced_filter_rules_list',
                'type' => 'textarea',
                'instructions' => 'Complex filtering conditions and rules',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '',
                    'class' => '',
                    'id' => '',
                ),
                'default_value' => '',
                'placeholder' => '',
                'maxlength' => '',
                'rows' => 10,
                'new_lines' => '',
                'readonly' => 1,
            ),
            array(
                'key' => 'field_gv_default_sort_field',
                'label' => 'Default Sort Field',
                'name' => 'default_sort_field',
                'type' => 'text',
                'instructions' => '',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '50',
                    'class' => '',
                    'id' => '',
                ),
                'default_value' => '',
                'placeholder' => '',
                'prepend' => '',
                'append' => '',
                'maxlength' => '',
                'readonly' => 1,
            ),
            array(
                'key' => 'field_gv_default_sort_direction',
                'label' => 'Sort Direction',
                'name' => 'default_sort_direction',
                'type' => 'select',
                'instructions' => '',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '50',
                    'class' => '',
                    'id' => '',
                ),
                'choices' => array(
                    'asc' => 'Ascending',
                    'desc' => 'Descending',
                ),
                'default_value' => 'desc',
                'allow_null' => 0,
                'multiple' => 0,
                'ui' => 0,
                'return_format' => 'value',
                'ajax' => 0,
                'placeholder' => '',
                'disabled' => 1,
                'readonly' => 1,
            ),
            array(
                'key' => 'field_gv_search_enabled',
                'label' => 'Search Enabled',
                'name' => 'search_enabled',
                'type' => 'true_false',
                'instructions' => '',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '33',
                    'class' => '',
                    'id' => '',
                ),
                'message' => '',
                'default_value' => 0,
                'ui' => 1,
                'ui_on_text' => 'Yes',
                'ui_off_text' => 'No',
                'readonly' => 1,
            ),
            array(
                'key' => 'field_gv_pagination_enabled',
                'label' => 'Pagination',
                'name' => 'pagination_enabled',
                'type' => 'true_false',
                'instructions' => '',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '33',
                    'class' => '',
                    'id' => '',
                ),
                'message' => '',
                'default_value' => 0,
                'ui' => 1,
                'ui_on_text' => 'Enabled',
                'ui_off_text' => 'Disabled',
                'readonly' => 1,
            ),
            array(
                'key' => 'field_gv_entries_per_page',
                'label' => 'Entries per Page',
                'name' => 'entries_per_page',
                'type' => 'number',
                'instructions' => '',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '34',
                    'class' => '',
                    'id' => '',
                ),
                'default_value' => 20,
                'placeholder' => '',
                'prepend' => '',
                'append' => '',
                'min' => '',
                'max' => '',
                'step' => '',
                'readonly' => 1,
            ),
            array(
                'key' => 'field_gv_search_fields_list',
                'label' => 'Searchable Fields',
                'name' => 'search_fields_list',
                'type' => 'textarea',
                'instructions' => 'List of fields that can be searched',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '',
                    'class' => '',
                    'id' => '',
                ),
                'default_value' => '',
                'placeholder' => '',
                'maxlength' => '',
                'rows' => 6,
                'new_lines' => '',
                'readonly' => 1,
            ),
            
            // ==========================================
            // TAB 5: DISPLAY SETTINGS
            // ==========================================
            array(
                'key' => 'field_tab_display_settings',
                'label' => 'Display Settings',
                'name' => '',
                'type' => 'tab',
                'instructions' => '',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '',
                    'class' => '',
                    'id' => '',
                ),
                'placement' => 'top',
                'endpoint' => 0,
            ),
            
            array(
                'key' => 'field_gv_show_only_approved',
                'label' => 'Show Only Approved',
                'name' => 'show_only_approved',
                'type' => 'true_false',
                'instructions' => '',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '25',
                    'class' => '',
                    'id' => '',
                ),
                'message' => '',
                'default_value' => 0,
                'ui' => 1,
                'ui_on_text' => 'Yes',
                'ui_off_text' => 'No',
                'readonly' => 1,
            ),
            array(
                'key' => 'field_gv_hide_empty_fields',
                'label' => 'Hide Empty Fields',
                'name' => 'hide_empty_fields',
                'type' => 'true_false',
                'instructions' => '',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '25',
                    'class' => '',
                    'id' => '',
                ),
                'message' => '',
                'default_value' => 0,
                'ui' => 1,
                'ui_on_text' => 'Yes',
                'ui_off_text' => 'No',
                'readonly' => 1,
            ),
            array(
                'key' => 'field_gv_hide_until_searched',
                'label' => 'Hide Until Searched',
                'name' => 'hide_until_searched',
                'type' => 'true_false',
                'instructions' => '',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '25',
                    'class' => '',
                    'id' => '',
                ),
                'message' => '',
                'default_value' => 0,
                'ui' => 1,
                'ui_on_text' => 'Yes',
                'ui_off_text' => 'No',
                'readonly' => 1,
            ),
            array(
                'key' => 'field_gv_lightbox_enabled',
                'label' => 'Lightbox for Images',
                'name' => 'lightbox_enabled',
                'type' => 'true_false',
                'instructions' => '',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '25',
                    'class' => '',
                    'id' => '',
                ),
                'message' => '',
                'default_value' => 0,
                'ui' => 1,
                'ui_on_text' => 'Enabled',
                'ui_off_text' => 'Disabled',
                'readonly' => 1,
            ),
            array(
                'key' => 'field_gv_featured_entries_enabled',
                'label' => 'Featured Entries',
                'name' => 'featured_entries_enabled',
                'type' => 'true_false',
                'instructions' => '',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '50',
                    'class' => '',
                    'id' => '',
                ),
                'message' => '',
                'default_value' => 0,
                'ui' => 1,
                'ui_on_text' => 'Enabled',
                'ui_off_text' => 'Disabled',
                'readonly' => 1,
            ),
            array(
                'key' => 'field_gv_ratings_enabled',
                'label' => 'Ratings & Reviews',
                'name' => 'ratings_enabled',
                'type' => 'true_false',
                'instructions' => '',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '50',
                    'class' => '',
                    'id' => '',
                ),
                'message' => '',
                'default_value' => 0,
                'ui' => 1,
                'ui_on_text' => 'Enabled',
                'ui_off_text' => 'Disabled',
                'readonly' => 1,
            ),
            array(
                'key' => 'field_gv_entry_link_type',
                'label' => 'Entry Link Type',
                'name' => 'entry_link_type',
                'type' => 'select',
                'instructions' => '',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '50',
                    'class' => '',
                    'id' => '',
                ),
                'choices' => array(
                    'single_entry' => 'Single Entry Page',
                    'new_tab' => 'New Tab',
                    'lightbox' => 'Lightbox',
                    'none' => 'No Link',
                ),
                'default_value' => 'single_entry',
                'allow_null' => 0,
                'multiple' => 0,
                'ui' => 0,
                'return_format' => 'value',
                'ajax' => 0,
                'placeholder' => '',
                'disabled' => 1,
                'readonly' => 1,
            ),
            array(
                'key' => 'field_gv_no_entries_message',
                'label' => 'No Entries Message',
                'name' => 'no_entries_message',
                'type' => 'textarea',
                'instructions' => 'Message displayed when no entries found',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '',
                    'class' => '',
                    'id' => '',
                ),
                'default_value' => '',
                'placeholder' => '',
                'maxlength' => '',
                'rows' => 4,
                'new_lines' => '',
                'readonly' => 1,
            ),
            array(
                'key' => 'field_gv_table_columns_config',
                'label' => 'Table Columns Configuration',
                'name' => 'table_columns_config',
                'type' => 'textarea',
                'instructions' => 'Column settings for table views',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '50',
                    'class' => '',
                    'id' => '',
                ),
                'default_value' => '',
                'placeholder' => '',
                'maxlength' => '',
                'rows' => 8,
                'new_lines' => '',
                'readonly' => 1,
            ),
            array(
                'key' => 'field_gv_map_settings_details',
                'label' => 'Map Settings',
                'name' => 'map_settings_details',
                'type' => 'textarea',
                'instructions' => 'Map view configuration (center, zoom, markers)',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '50',
                    'class' => '',
                    'id' => '',
                ),
                'default_value' => '',
                'placeholder' => '',
                'maxlength' => '',
                'rows' => 8,
                'new_lines' => '',
                'readonly' => 1,
            ),
            array(
                'key' => 'field_gv_calendar_settings_details',
                'label' => 'Calendar Settings',
                'name' => 'calendar_settings_details',
                'type' => 'textarea',
                'instructions' => 'Calendar view configuration',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '',
                    'class' => '',
                    'id' => '',
                ),
                'default_value' => '',
                'placeholder' => '',
                'maxlength' => '',
                'rows' => 8,
                'new_lines' => '',
                'readonly' => 1,
            ),
            
            // ==========================================
            // TAB 6: PERMISSIONS & CAPABILITIES
            // ==========================================
            array(
                'key' => 'field_tab_permissions',
                'label' => 'Permissions',
                'name' => '',
                'type' => 'tab',
                'instructions' => '',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '',
                    'class' => '',
                    'id' => '',
                ),
                'placement' => 'top',
                'endpoint' => 0,
            ),
            
            array(
                'key' => 'field_gv_view_permissions',
                'label' => 'View Permissions',
                'name' => 'view_permissions',
                'type' => 'select',
                'instructions' => '',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '33',
                    'class' => '',
                    'id' => '',
                ),
                'choices' => array(
                    'public' => 'Public',
                    'logged-in' => 'Logged In Users',
                    'role-based' => 'Role Based',
                ),
                'default_value' => 'public',
                'allow_null' => 0,
                'multiple' => 0,
                'ui' => 0,
                'return_format' => 'value',
                'ajax' => 0,
                'placeholder' => '',
                'disabled' => 1,
                'readonly' => 1,
            ),
            array(
                'key' => 'field_gv_edit_entry_permission',
                'label' => 'Edit Permission',
                'name' => 'edit_entry_permission',
                'type' => 'select',
                'instructions' => '',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '33',
                    'class' => '',
                    'id' => '',
                ),
                'choices' => array(
                    'creator' => 'Entry Creator',
                    'admin' => 'Admin Only',
                    'role-based' => 'Role Based',
                    'none' => 'No Editing',
                ),
                'default_value' => 'creator',
                'allow_null' => 0,
                'multiple' => 0,
                'ui' => 0,
                'return_format' => 'value',
                'ajax' => 0,
                'placeholder' => '',
                'disabled' => 1,
                'readonly' => 1,
            ),
            array(
                'key' => 'field_gv_delete_entry_permission',
                'label' => 'Delete Permission',
                'name' => 'delete_entry_permission',
                'type' => 'select',
                'instructions' => '',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '34',
                    'class' => '',
                    'id' => '',
                ),
                'choices' => array(
                    'creator' => 'Entry Creator',
                    'admin' => 'Admin Only',
                    'role-based' => 'Role Based',
                    'none' => 'No Deleting',
                ),
                'default_value' => 'admin',
                'allow_null' => 0,
                'multiple' => 0,
                'ui' => 0,
                'return_format' => 'value',
                'ajax' => 0,
                'placeholder' => '',
                'disabled' => 1,
                'readonly' => 1,
            ),
            array(
                'key' => 'field_gv_user_edit_enabled',
                'label' => 'User Edit Own Entries',
                'name' => 'user_edit_enabled',
                'type' => 'true_false',
                'instructions' => '',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '33',
                    'class' => '',
                    'id' => '',
                ),
                'message' => '',
                'default_value' => 0,
                'ui' => 1,
                'ui_on_text' => 'Yes',
                'ui_off_text' => 'No',
                'readonly' => 1,
            ),
            array(
                'key' => 'field_gv_user_delete_enabled',
                'label' => 'User Delete Own Entries',
                'name' => 'user_delete_enabled',
                'type' => 'true_false',
                'instructions' => '',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '33',
                    'class' => '',
                    'id' => '',
                ),
                'message' => '',
                'default_value' => 0,
                'ui' => 1,
                'ui_on_text' => 'Yes',
                'ui_off_text' => 'No',
                'readonly' => 1,
            ),
            array(
                'key' => 'field_gv_moderate_entries',
                'label' => 'Moderate Entries',
                'name' => 'moderate_entries',
                'type' => 'true_false',
                'instructions' => 'Require approval before display',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '34',
                    'class' => '',
                    'id' => '',
                ),
                'message' => '',
                'default_value' => 0,
                'ui' => 1,
                'ui_on_text' => 'Yes',
                'ui_off_text' => 'No',
                'readonly' => 1,
            ),
            array(
                'key' => 'field_gv_magic_links_enabled',
                'label' => 'Magic Links',
                'name' => 'magic_links_enabled',
                'type' => 'true_false',
                'instructions' => 'Secure editing without login',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '50',
                    'class' => '',
                    'id' => '',
                ),
                'message' => '',
                'default_value' => 0,
                'ui' => 1,
                'ui_on_text' => 'Enabled',
                'ui_off_text' => 'Disabled',
                'readonly' => 1,
            ),
            array(
                'key' => 'field_gv_magic_links_config',
                'label' => 'Magic Links Configuration',
                'name' => 'magic_links_config',
                'type' => 'textarea',
                'instructions' => 'Magic Links settings and tokens',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '50',
                    'class' => '',
                    'id' => '',
                ),
                'default_value' => '',
                'placeholder' => '',
                'maxlength' => '',
                'rows' => 6,
                'new_lines' => '',
                'readonly' => 1,
            ),
            array(
                'key' => 'field_gv_allowed_user_roles_list',
                'label' => 'Allowed User Roles',
                'name' => 'allowed_user_roles_list',
                'type' => 'textarea',
                'instructions' => 'Roles with view/edit permissions',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '',
                    'class' => '',
                    'id' => '',
                ),
                'default_value' => '',
                'placeholder' => '',
                'maxlength' => '',
                'rows' => 6,
                'new_lines' => '',
                'readonly' => 1,
            ),
            
            // ==========================================
            // TAB 7: EXPORT & OUTPUT SETTINGS
            // ==========================================
            array(
                'key' => 'field_tab_export_output',
                'label' => 'Export & Output',
                'name' => '',
                'type' => 'tab',
                'instructions' => '',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '',
                    'class' => '',
                    'id' => '',
                ),
                'placement' => 'top',
                'endpoint' => 0,
            ),
            
            array(
                'key' => 'field_gv_csv_export_enabled',
                'label' => 'CSV Export',
                'name' => 'csv_export_enabled',
                'type' => 'true_false',
                'instructions' => '',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '25',
                    'class' => '',
                    'id' => '',
                ),
                'message' => '',
                'default_value' => 0,
                'ui' => 1,
                'ui_on_text' => 'Enabled',
                'ui_off_text' => 'Disabled',
                'readonly' => 1,
            ),
            array(
                'key' => 'field_gv_print_enabled',
                'label' => 'Print',
                'name' => 'print_enabled',
                'type' => 'true_false',
                'instructions' => '',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '25',
                    'class' => '',
                    'id' => '',
                ),
                'message' => '',
                'default_value' => 0,
                'ui' => 1,
                'ui_on_text' => 'Enabled',
                'ui_off_text' => 'Disabled',
                'readonly' => 1,
            ),
            array(
                'key' => 'field_gv_pdf_export_enabled',
                'label' => 'PDF Export',
                'name' => 'pdf_export_enabled',
                'type' => 'true_false',
                'instructions' => '',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '25',
                    'class' => '',
                    'id' => '',
                ),
                'message' => '',
                'default_value' => 0,
                'ui' => 1,
                'ui_on_text' => 'Enabled',
                'ui_off_text' => 'Disabled',
                'readonly' => 1,
            ),
            array(
                'key' => 'field_gv_excel_export_enabled',
                'label' => 'Excel Export',
                'name' => 'excel_export_enabled',
                'type' => 'true_false',
                'instructions' => '',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '25',
                    'class' => '',
                    'id' => '',
                ),
                'message' => '',
                'default_value' => 0,
                'ui' => 1,
                'ui_on_text' => 'Enabled',
                'ui_off_text' => 'Disabled',
                'readonly' => 1,
            ),
            array(
                'key' => 'field_gv_export_permissions',
                'label' => 'Export Permissions',
                'name' => 'export_permissions',
                'type' => 'select',
                'instructions' => '',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '',
                    'class' => '',
                    'id' => '',
                ),
                'choices' => array(
                    'public' => 'Public',
                    'logged-in' => 'Logged In Users',
                    'admin' => 'Admin Only',
                ),
                'default_value' => 'logged-in',
                'allow_null' => 0,
                'multiple' => 0,
                'ui' => 0,
                'return_format' => 'value',
                'ajax' => 0,
                'placeholder' => '',
                'disabled' => 1,
                'readonly' => 1,
            ),
            array(
                'key' => 'field_gv_csv_export_fields_list',
                'label' => 'CSV Export Fields',
                'name' => 'csv_export_fields_list',
                'type' => 'textarea',
                'instructions' => 'Fields included in CSV export',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '',
                    'class' => '',
                    'id' => '',
                ),
                'default_value' => '',
                'placeholder' => '',
                'maxlength' => '',
                'rows' => 8,
                'new_lines' => '',
                'readonly' => 1,
            ),
            array(
                'key' => 'field_gv_print_layout_config',
                'label' => 'Print Layout Configuration',
                'name' => 'print_layout_config',
                'type' => 'textarea',
                'instructions' => 'Print-specific settings and layout',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '',
                    'class' => '',
                    'id' => '',
                ),
                'default_value' => '',
                'placeholder' => '',
                'maxlength' => '',
                'rows' => 8,
                'new_lines' => '',
                'readonly' => 1,
            ),
            
            // ==========================================
            // TAB 8: INTEGRATIONS & EXTENSIONS
            // ==========================================
            array(
                'key' => 'field_tab_integrations',
                'label' => 'Integrations',
                'name' => '',
                'type' => 'tab',
                'instructions' => '',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '',
                    'class' => '',
                    'id' => '',
                ),
                'placement' => 'top',
                'endpoint' => 0,
            ),
            
            array(
                'key' => 'field_gv_gravity_flow_enabled',
                'label' => 'Gravity Flow',
                'name' => 'gravity_flow_enabled',
                'type' => 'true_false',
                'instructions' => '',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '25',
                    'class' => '',
                    'id' => '',
                ),
                'message' => '',
                'default_value' => 0,
                'ui' => 1,
                'ui_on_text' => 'Active',
                'ui_off_text' => 'Inactive',
                'readonly' => 1,
            ),
            array(
                'key' => 'field_gv_gravity_pdf_enabled',
                'label' => 'Gravity PDF',
                'name' => 'gravity_pdf_enabled',
                'type' => 'true_false',
                'instructions' => '',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '25',
                    'class' => '',
                    'id' => '',
                ),
                'message' => '',
                'default_value' => 0,
                'ui' => 1,
                'ui_on_text' => 'Active',
                'ui_off_text' => 'Inactive',
                'readonly' => 1,
            ),
            array(
                'key' => 'field_gv_gravity_calendar_enabled',
                'label' => 'Gravity Calendar',
                'name' => 'gravity_calendar_enabled',
                'type' => 'true_false',
                'instructions' => '',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '25',
                    'class' => '',
                    'id' => '',
                ),
                'message' => '',
                'default_value' => 0,
                'ui' => 1,
                'ui_on_text' => 'Active',
                'ui_off_text' => 'Inactive',
                'readonly' => 1,
            ),
            array(
                'key' => 'field_gv_gravity_charts_enabled',
                'label' => 'Gravity Charts',
                'name' => 'gravity_charts_enabled',
                'type' => 'true_false',
                'instructions' => '',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '25',
                    'class' => '',
                    'id' => '',
                ),
                'message' => '',
                'default_value' => 0,
                'ui' => 1,
                'ui_on_text' => 'Active',
                'ui_off_text' => 'Inactive',
                'readonly' => 1,
            ),
            array(
                'key' => 'field_gv_gravity_boards_enabled',
                'label' => 'Gravity Boards',
                'name' => 'gravity_boards_enabled',
                'type' => 'true_false',
                'instructions' => 'Kanban boards integration',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '',
                    'class' => '',
                    'id' => '',
                ),
                'message' => '',
                'default_value' => 0,
                'ui' => 1,
                'ui_on_text' => 'Active',
                'ui_off_text' => 'Inactive',
                'readonly' => 1,
            ),
            array(
                'key' => 'field_gv_gravity_flow_settings',
                'label' => 'Gravity Flow Settings',
                'name' => 'gravity_flow_settings',
                'type' => 'textarea',
                'instructions' => 'Workflow configurations and steps',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '',
                    'class' => '',
                    'id' => '',
                ),
                'default_value' => '',
                'placeholder' => '',
                'maxlength' => '',
                'rows' => 8,
                'new_lines' => '',
                'readonly' => 1,
            ),
            array(
                'key' => 'field_gv_gravity_pdf_templates',
                'label' => 'Gravity PDF Templates',
                'name' => 'gravity_pdf_templates',
                'type' => 'textarea',
                'instructions' => 'PDF template configurations',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '',
                    'class' => '',
                    'id' => '',
                ),
                'default_value' => '',
                'placeholder' => '',
                'maxlength' => '',
                'rows' => 8,
                'new_lines' => '',
                'readonly' => 1,
            ),
            array(
                'key' => 'field_gv_gravity_calendar_settings',
                'label' => 'Gravity Calendar Settings',
                'name' => 'gravity_calendar_settings',
                'type' => 'textarea',
                'instructions' => 'Calendar integration details',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '',
                    'class' => '',
                    'id' => '',
                ),
                'default_value' => '',
                'placeholder' => '',
                'maxlength' => '',
                'rows' => 8,
                'new_lines' => '',
                'readonly' => 1,
            ),
            array(
                'key' => 'field_gv_gravity_charts_config',
                'label' => 'Gravity Charts Configuration',
                'name' => 'gravity_charts_config',
                'type' => 'textarea',
                'instructions' => 'Chart settings and data sources',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '',
                    'class' => '',
                    'id' => '',
                ),
                'default_value' => '',
                'placeholder' => '',
                'maxlength' => '',
                'rows' => 8,
                'new_lines' => '',
                'readonly' => 1,
            ),
            array(
                'key' => 'field_gv_gravity_boards_settings',
                'label' => 'Gravity Boards Settings',
                'name' => 'gravity_boards_settings',
                'type' => 'textarea',
                'instructions' => 'Kanban board configurations',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '',
                    'class' => '',
                    'id' => '',
                ),
                'default_value' => '',
                'placeholder' => '',
                'maxlength' => '',
                'rows' => 8,
                'new_lines' => '',
                'readonly' => 1,
            ),
            array(
                'key' => 'field_gv_gravity_math_calculations',
                'label' => 'Gravity Math Calculations',
                'name' => 'gravity_math_calculations',
                'type' => 'textarea',
                'instructions' => '[gv_math] shortcodes and calculations',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '',
                    'class' => '',
                    'id' => '',
                ),
                'default_value' => '',
                'placeholder' => '',
                'maxlength' => '',
                'rows' => 8,
                'new_lines' => '',
                'readonly' => 1,
            ),
            array(
                'key' => 'field_gv_connected_feeds_list',
                'label' => 'Connected Feeds',
                'name' => 'connected_feeds_list',
                'type' => 'textarea',
                'instructions' => 'All connected feeds and add-ons',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '',
                    'class' => '',
                    'id' => '',
                ),
                'default_value' => '',
                'placeholder' => '',
                'maxlength' => '',
                'rows' => 8,
                'new_lines' => '',
                'readonly' => 1,
            ),
            
            // ==========================================
            // TAB 9: CUSTOM CODE
            // ==========================================
            array(
                'key' => 'field_tab_custom_code',
                'label' => 'Custom Code',
                'name' => '',
                'type' => 'tab',
                'instructions' => '',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '',
                    'class' => '',
                    'id' => '',
                ),
                'placement' => 'top',
                'endpoint' => 0,
            ),
            
            array(
                'key' => 'field_gv_custom_css',
                'label' => 'Custom CSS',
                'name' => 'custom_css',
                'type' => 'textarea',
                'instructions' => 'All custom CSS for this view',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '',
                    'class' => '',
                    'id' => '',
                ),
                'default_value' => '',
                'placeholder' => '',
                'maxlength' => '',
                'rows' => 12,
                'new_lines' => '',
                'readonly' => 1,
            ),
            array(
                'key' => 'field_gv_custom_javascript',
                'label' => 'Custom JavaScript',
                'name' => 'custom_javascript',
                'type' => 'textarea',
                'instructions' => 'All custom JavaScript for this view',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '',
                    'class' => '',
                    'id' => '',
                ),
                'default_value' => '',
                'placeholder' => '',
                'maxlength' => '',
                'rows' => 12,
                'new_lines' => '',
                'readonly' => 1,
            ),
            array(
                'key' => 'field_gv_custom_php_hooks',
                'label' => 'Custom PHP Hooks',
                'name' => 'custom_php_hooks',
                'type' => 'textarea',
                'instructions' => 'PHP hooks and filters used for this view',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '',
                    'class' => '',
                    'id' => '',
                ),
                'default_value' => '',
                'placeholder' => '',
                'maxlength' => '',
                'rows' => 12,
                'new_lines' => '',
                'readonly' => 1,
            ),
            array(
                'key' => 'field_gv_css_classes',
                'label' => 'CSS Classes',
                'name' => 'css_classes',
                'type' => 'text',
                'instructions' => 'Custom CSS classes applied to the view',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '',
                    'class' => '',
                    'id' => '',
                ),
                'default_value' => '',
                'placeholder' => '',
                'prepend' => '',
                'append' => '',
                'maxlength' => '',
                'readonly' => 1,
            ),
            
            // ==========================================
            // TAB 10: REST API & SYNC
            // ==========================================
            array(
                'key' => 'field_tab_rest_sync',
                'label' => 'REST API & Sync',
                'name' => '',
                'type' => 'tab',
                'instructions' => '',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '',
                    'class' => '',
                    'id' => '',
                ),
                'placement' => 'top',
                'endpoint' => 0,
            ),
            
            array(
                'key' => 'field_gv_rest_api_enabled',
                'label' => 'REST API Enabled',
                'name' => 'rest_api_enabled',
                'type' => 'true_false',
                'instructions' => '',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '50',
                    'class' => '',
                    'id' => '',
                ),
                'message' => '',
                'default_value' => 0,
                'ui' => 1,
                'ui_on_text' => 'Yes',
                'ui_off_text' => 'No',
                'readonly' => 1,
            ),
            array(
                'key' => 'field_gv_whalesync_status',
                'label' => 'WhaleSync Status',
                'name' => 'whalesync_status',
                'type' => 'select',
                'instructions' => '',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '50',
                    'class' => '',
                    'id' => '',
                ),
                'choices' => array(
                    'active' => 'Active',
                    'paused' => 'Paused',
                    'error' => 'Error',
                ),
                'default_value' => 'active',
                'allow_null' => 0,
                'multiple' => 0,
                'ui' => 0,
                'return_format' => 'value',
                'ajax' => 0,
                'placeholder' => '',
                'disabled' => 1,
                'readonly' => 1,
            ),
            array(
                'key' => 'field_gv_api_endpoints_list',
                'label' => 'API Endpoints',
                'name' => 'api_endpoints_list',
                'type' => 'textarea',
                'instructions' => 'Available REST API endpoints for this view',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '',
                    'class' => '',
                    'id' => '',
                ),
                'default_value' => '',
                'placeholder' => '',
                'maxlength' => '',
                'rows' => 8,
                'new_lines' => '',
                'readonly' => 1,
            ),
            array(
                'key' => 'field_gv_last_sync',
                'label' => 'Last Sync',
                'name' => 'last_sync',
                'type' => 'date_time_picker',
                'instructions' => '',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '50',
                    'class' => '',
                    'id' => '',
                ),
                'display_format' => 'Y-m-d H:i:s',
                'return_format' => 'Y-m-d H:i:s',
                'first_day' => 1,
                'readonly' => 1,
            ),
            array(
                'key' => 'field_gv_airtable_record_id',
                'label' => 'Airtable Record ID',
                'name' => 'airtable_record_id',
                'type' => 'text',
                'instructions' => '',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '50',
                    'class' => '',
                    'id' => '',
                ),
                'default_value' => '',
                'placeholder' => '',
                'prepend' => '',
                'append' => '',
                'maxlength' => '',
                'readonly' => 1,
            ),
            array(
                'key' => 'field_gv_sync_errors',
                'label' => 'Sync Errors',
                'name' => 'sync_errors',
                'type' => 'textarea',
                'instructions' => 'Any errors during sync process',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '',
                    'class' => '',
                    'id' => '',
                ),
                'default_value' => '',
                'placeholder' => '',
                'maxlength' => '',
                'rows' => 6,
                'new_lines' => '',
                'readonly' => 1,
            ),
            
            // Utility Fields (No Tab - append to last tab)
            array(
                'key' => 'field_gv_embedded_pages_list',
                'label' => 'Embedded Pages',
                'name' => 'embedded_pages_list',
                'type' => 'textarea',
                'instructions' => 'Pages/posts where this view is embedded',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '',
                    'class' => '',
                    'id' => '',
                ),
                'default_value' => '',
                'placeholder' => '',
                'maxlength' => '',
                'rows' => 6,
                'new_lines' => '',
                'readonly' => 1,
            ),
            array(
                'key' => 'field_gv_view_notes',
                'label' => 'Internal Notes',
                'name' => 'view_notes',
                'type' => 'textarea',
                'instructions' => 'Internal notes about this view',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '',
                    'class' => '',
                    'id' => '',
                ),
                'default_value' => '',
                'placeholder' => '',
                'maxlength' => '',
                'rows' => 6,
                'new_lines' => 'br',
            ),
            array(
                'key' => 'field_gv_cache_enabled',
                'label' => 'Cache Enabled',
                'name' => 'cache_enabled',
                'type' => 'true_false',
                'instructions' => '',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '33',
                    'class' => '',
                    'id' => '',
                ),
                'message' => '',
                'default_value' => 0,
                'ui' => 1,
                'ui_on_text' => 'Yes',
                'ui_off_text' => 'No',
                'readonly' => 1,
            ),
            array(
                'key' => 'field_gv_cache_duration',
                'label' => 'Cache Duration',
                'name' => 'cache_duration',
                'type' => 'number',
                'instructions' => 'In seconds',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '33',
                    'class' => '',
                    'id' => '',
                ),
                'default_value' => 3600,
                'placeholder' => '',
                'prepend' => '',
                'append' => 'seconds',
                'min' => '',
                'max' => '',
                'step' => '',
                'readonly' => 1,
            ),
            array(
                'key' => 'field_gv_total_fields_count',
                'label' => 'Total Fields Count',
                'name' => 'total_fields_count',
                'type' => 'number',
                'instructions' => '',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '34',
                    'class' => '',
                    'id' => '',
                ),
                'default_value' => 0,
                'placeholder' => '',
                'prepend' => '',
                'append' => '',
                'min' => '',
                'max' => '',
                'step' => '',
                'readonly' => 1,
            ),
            array(
                'key' => 'field_gv_view_template',
                'label' => 'View Template',
                'name' => 'view_template',
                'type' => 'text',
                'instructions' => 'Template file being used',
                'required' => 0,
                'conditional_logic' => 0,
                'wrapper' => array(
                    'width' => '',
                    'class' => '',
                    'id' => '',
                ),
                'default_value' => '',
                'placeholder' => '',
                'prepend' => '',
                'append' => '',
                'maxlength' => '',
                'readonly' => 1,
            ),
        ),
        'location' => array(
            array(
                array(
                    'param' => 'post_type',
                    'operator' => '==',
                    'value' => 'gv_views_sync',
                ),
            ),
        ),
        'menu_order' => 0,
        'position' => 'normal',
        'style' => 'default',
        'label_placement' => 'top',
        'instruction_placement' => 'label',
        'hide_on_screen' => array(
            0 => 'the_content',
            1 => 'excerpt',
            2 => 'discussion',
            3 => 'comments',
            4 => 'revisions',
            5 => 'slug',
            6 => 'author',
            7 => 'format',
            8 => 'page_attributes',
            9 => 'featured_image',
            10 => 'categories',
            11 => 'tags',
            12 => 'send-trackbacks',
        ),
        'active' => true,
        'description' => 'Comprehensive GravityView configuration fields for synchronization',
    ) );
} );

Comments

Add a Comment