spivurno
1/25/2013 - 6:54 PM

Test Class for adding custom settings page in Gravity Forms 1.7

Test Class for adding custom settings page in Gravity Forms 1.7

<?php

/**
* Test Class for adding custom settings page in Gravity Forms 1.7
*/

class GFTest {

    private static $slug;

    function __construct() {

        $this->slug = 'gftest';

        add_action('gform_form_settings_menu', array(&$this, 'add_form_settings_menu'));
        add_action("gform_form_settings_page_{$this->slug}", array(&$this, 'add_form_settings_page'));

    }

    function add_form_settings_menu($tabs) {
        $tabs[] = array("name" => $this->slug, "label" => __("Dave's Settings", "gravitytest"));
        return $tabs;
    }

    function add_form_settings_page() {
        GFFormSettings::page_header();
        ?>

        <h2>Just Happened</h2>
        <p>I'm going to let Kev handle this issue where small content and taller tabs results in a some funk.</p>
        <p>I'm going to let Kev handle this issue where small content and taller tabs results in a some funk.</p>
        <p>I'm going to let Kev handle this issue where small content and taller tabs results in a some funk.</p>
        <p>I'm going to let Kev handle this issue where small content and taller tabs results in a some funk.</p>

        <?php
        GFFormSettings::page_footer();
    }

}

new GFTest();