• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP RGForms类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中RGForms的典型用法代码示例。如果您正苦于以下问题:PHP RGForms类的具体用法?PHP RGForms怎么用?PHP RGForms使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了RGForms类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: init

 public static function init()
 {
     if (basename($_SERVER['PHP_SELF']) == "plugins.php") {
         //loading translations
         load_plugin_textdomain('gravityformsmailchimp', FALSE, '/gravityformsmailchimp/languages');
         add_action('after_plugin_row_' . self::$path, array('GFMailChimp', 'plugin_row'));
         //force new remote request for version info on the plugin page
         self::flush_version_info();
     }
     if (!self::is_gravityforms_supported()) {
         return;
     }
     if (is_admin()) {
         //loading translations
         load_plugin_textdomain('gravityformsmailchimp', FALSE, '/gravityformsmailchimp/languages');
         add_filter("transient_update_plugins", array('GFMailChimp', 'check_update'));
         add_filter("site_transient_update_plugins", array('GFMailChimp', 'check_update'));
         add_action('install_plugins_pre_plugin-information', array('GFMailChimp', 'display_changelog'));
         // paypal plugin integration hooks
         add_action("gform_paypal_action_fields", array("GFMailChimp", "add_paypal_settings"), 10, 2);
         add_filter("gform_paypal_save_config", array("GFMailChimp", "save_paypal_settings"));
         //creates a new Settings page on Gravity Forms' settings screen
         if (self::has_access("gravityforms_mailchimp")) {
             RGForms::add_settings_page("MailChimp", array("GFMailChimp", "settings_page"), self::get_base_url() . "/images/mailchip_wordpress_icon_32.png");
         }
     }
     //integrating with Members plugin
     if (function_exists('members_get_capabilities')) {
         add_filter('members_get_capabilities', array("GFMailChimp", "members_get_capabilities"));
     }
     //creates the subnav left menu
     add_filter("gform_addon_navigation", array('GFMailChimp', 'create_menu'));
     if (self::is_mailchimp_page()) {
         //enqueueing sack for AJAX requests
         wp_enqueue_script(array("sack"));
         //loading data lib
         require_once self::get_base_path() . "/data.php";
         //loading upgrade lib
         if (!class_exists("RGMailChimpUpgrade")) {
             require_once "plugin-upgrade.php";
         }
         //loading Gravity Forms tooltips
         require_once GFCommon::get_base_path() . "/tooltips.php";
         add_filter('gform_tooltips', array('GFMailChimp', 'tooltips'));
         //runs the setup when version changes
         self::setup();
     } else {
         if (in_array(RG_CURRENT_PAGE, array("admin-ajax.php"))) {
             //loading data class
             require_once self::get_base_path() . "/data.php";
             add_action('wp_ajax_rg_update_feed_active', array('GFMailChimp', 'update_feed_active'));
             add_action('wp_ajax_gf_select_mailchimp_form', array('GFMailChimp', 'select_mailchimp_form'));
         } else {
             //handling post submission.
             add_action("gform_after_submission", array('GFMailChimp', 'export'), 10, 2);
             //handling paypal fulfillment
             add_action("gform_paypal_fulfillment", array("GFMailChimp", "paypal_fulfillment"), 10, 4);
         }
     }
 }
开发者ID:vinvinh315,项目名称:maintainwebsolutions.com,代码行数:60,代码来源:mailchimp.php


示例2: init

 public static function init()
 {
     global $pagenow;
     load_plugin_textdomain('gravity-forms-marketo', FALSE, '/gravity-forms-marketo/languages');
     if ($pagenow === 'plugins.php') {
         add_action("admin_notices", array('GFMarketo', 'is_gravity_forms_installed'), 10);
     }
     if (self::is_gravity_forms_installed(false, false) === 0) {
         add_action('after_plugin_row_' . self::$path, array('GFMarketo', 'plugin_row'));
         return;
     }
     add_filter('plugin_action_links', array('GFMarketo', 'settings_link'), 10, 2);
     if (!self::is_gravityforms_supported()) {
         return;
     }
     if (is_admin()) {
         //loading translations
         load_plugin_textdomain('gravity-forms-marketo', FALSE, '/gravity-forms-marketo/languages');
         //creates a new Settings page on Gravity Forms' settings screen
         if (self::has_access("gravityforms_marketo")) {
             RGForms::add_settings_page("Marketo", array("GFMarketo", "settings_page"), self::get_base_url() . "/images/marketo_wordpress_icon_32.png");
         }
     }
     //integrating with Members plugin
     if (function_exists('members_get_capabilities')) {
         add_filter('members_get_capabilities', array("GFMarketo", "members_get_capabilities"));
     }
     //creates the subnav left menu
     add_filter("gform_addon_navigation", array('GFMarketo', 'create_menu'));
     if (self::is_marketo_page()) {
         //enqueueing sack for AJAX requests
         wp_enqueue_script(array("sack"));
         wp_enqueue_script("gforms_gravityforms", GFCommon::get_base_url() . "/js/gravityforms.js", null, GFCommon::$version);
         wp_enqueue_style("gforms_css", GFCommon::get_base_url() . "/css/forms.css", null, GFCommon::$version);
         //loading data lib
         require_once self::get_base_path() . "/data.php";
         self::setup_tooltips();
         //runs the setup when version changes
         self::setup();
     } else {
         if (in_array(RG_CURRENT_PAGE, array("admin-ajax.php"))) {
             //loading data class
             require_once self::get_base_path() . "/data.php";
             add_action('wp_ajax_rg_update_feed_active', array('GFMarketo', 'update_feed_active'));
             add_action('wp_ajax_gf_select_marketo_form', array('GFMarketo', 'select_marketo_form'));
         } else {
             //handling post submission.
             add_action('gform_after_submission', array('GFMarketo', 'export'), 10, 2);
         }
     }
     add_action('gform_entry_info', array('GFMarketo', 'entry_info_link_to_marketo'), 1, 2);
     add_filter('gform_save_field_value', array('GFMarketo', 'save_field_value'), 10, 4);
     add_filter('gform_entry_post_save', array('GFMarketo', 'gform_entry_post_save'), 1, 2);
     add_filter('gform_replace_merge_tags', array('GFMarketo', 'replace_merge_tag'), 1, 7);
     add_action("gform_custom_merge_tags", array('GFMarketo', "_deprecated_add_merge_tags"), 1, 4);
     add_action("gform_admin_pre_render", array('GFMarketo', "add_merge_tags"));
     add_filter('gform_pre_render', array('GFMarketo', 'merge_tag_gform_pre_render_filter'), 1, 4);
     add_action('gform_enqueue_scripts', array('GFMarketo', 'add_munchkin_js'), 10, 2);
     add_action('wp_footer', array('GFMarketo', 'add_munchkin_js'));
 }
开发者ID:emilysnothere,项目名称:Gravity-Forms-Marketo-Add-on,代码行数:60,代码来源:marketo.php


示例3: admin_init

 public function admin_init()
 {
     if ('gf_edit_forms' == RGForms::get('page') && 1 == count($_GET)) {
         $this->show_page_on_form_list();
         add_filter('gform_noconflict_scripts', array($this, 'gform_noconflict_scripts'));
     }
 }
开发者ID:jbeyta,项目名称:joelandsam,代码行数:7,代码来源:show-page-on-form-list.php


示例4: init

 public static function init()
 {
     add_action("admin_notices", array('GFSalesforce', 'is_gravity_forms_installed'), 10);
     if (!self::is_gravityforms_supported()) {
         return;
     }
     if (is_admin()) {
         //creates a new Settings page on Gravity Forms' settings screen
         if (self::has_access("gravityforms_salesforce")) {
             RGForms::add_settings_page("Salesforce", array("GFSalesforce", "settings_page"), self::get_base_url() . "/salesforce-50x50.png");
         }
     }
     //creates the subnav left menu
     add_filter("gform_addon_navigation", array('GFSalesforce', 'create_menu'));
     if (self::is_salesforce_page()) {
         //enqueueing sack for AJAX requests
         wp_enqueue_script(array("sack"));
         wp_enqueue_style('gravityforms-admin', GFCommon::get_base_url() . '/css/admin.css');
     } else {
         if (in_array(RG_CURRENT_PAGE, array("admin-ajax.php"))) {
             add_action('wp_ajax_rg_update_feed_active', array('GFSalesforce', 'update_feed_active'));
             add_action('wp_ajax_gf_select_salesforce_form', array('GFSalesforce', 'select_salesforce_form'));
         } elseif (in_array(RG_CURRENT_PAGE, array('admin.php'))) {
             add_action('admin_head', array('GFSalesforce', 'show_salesforce_status'));
         } else {
             add_action("gform_pre_submission", array('GFSalesforce', 'push'), 10, 2);
             //handling post submission.
         }
     }
     #add_action("gform_field_advanced_settings", array('GFSalesforce',"add_salesforce_editor_field"), 10, 2); // For future use
     add_action("gform_editor_js", array('GFSalesforce', 'add_form_option_js'), 10);
     add_filter('gform_tooltips', array('GFSalesforce', 'add_form_option_tooltip'));
     add_filter("gform_confirmation", array('GFSalesforce', 'confirmation_error'));
 }
开发者ID:rongandat,项目名称:cyarevfoods,代码行数:34,代码来源:salesforce.php


示例5: init

 public static function init()
 {
     self::include_logger();
     if (defined('RG_CURRENT_PAGE') && RG_CURRENT_PAGE == "plugins.php") {
         //loading translations
         load_plugin_textdomain('gravityformslogging', FALSE, '/gravityformslogging/languages');
         add_action('after_plugin_row_' . self::$path, array('GFLogging', 'plugin_row'));
         //force new remote request for version info on the plugin page
         self::flush_version_info();
     }
     if (!self::is_gravityforms_supported()) {
         return;
     }
     if (is_admin()) {
         //loading translations
         load_plugin_textdomain('gravityformslogging', FALSE, '/gravityformslogging/languages');
         add_filter("transient_update_plugins", array('GFLogging', 'check_update'));
         add_filter("site_transient_update_plugins", array('GFLogging', 'check_update'));
         add_action('install_plugins_pre_plugin-information', array('GFLogging', 'display_changelog'));
         //creates a new Settings page on Gravity Forms' settings screen
         if (self::has_access("gravityforms_logging")) {
             RGForms::add_settings_page("Logging", array("GFLogging", "settings_page"), "");
         }
     }
     //integrating with Members plugin
     if (function_exists('members_get_capabilities')) {
         add_filter('members_get_capabilities', array("GFLogging", "members_get_capabilities"));
     }
     if (self::is_logging_page()) {
         //loading upgrade lib
         require_once "plugin-upgrade.php";
     }
 }
开发者ID:beyond-z,项目名称:braven,代码行数:33,代码来源:logging.php


示例6: settings_page

    public static function settings_page()
    {
        $addon_name = RGForms::get("addon");
        $icon_path = empty($addon_name) ? "" : self::$addon_pages[$addon_name]["icon"];
        $page_title = empty($addon_name) ? __("Gravity Forms Settings", "gravityforms") : $addon_name . " " . __("Settings", "gravityforms");
        $icon_path = empty($icon_path) ? GFCommon::get_base_url() . "/images/gravity-settings-icon-32.png" : $icon_path;
        echo GFCommon::get_remote_message();
        ?>
        <link rel="stylesheet" href="<?php 
        echo GFCommon::get_base_url();
        ?>
/css/admin.css" />
        <div class="wrap">
            <img alt="<?php 
        $page_title;
        ?>
" src="<?php 
        echo $icon_path;
        ?>
" style="float:left; margin:15px 7px 0 0;"/>
            <h2><?php 
        echo $page_title;
        ?>
</h2>

        <?php 
        if (!empty(self::$addon_pages)) {
            ?>
            <ul class="subsubsub">
                <li><a href="?page=gf_settings">Gravity Forms</a> |</li>
            <?php 
            $count = sizeof(self::$addon_pages);
            for ($i = 0; $i < $count; $i++) {
                $addon_keys = array_keys(self::$addon_pages);
                $addon = $addon_keys[$i];
                ?>
                <li><a href="?page=gf_settings&addon=<?php 
                echo urlencode($addon);
                ?>
"><?php 
                echo esc_html($addon);
                ?>
</a> <?php 
                echo $i < $count - 1 ? "|" : "";
                ?>
</li>
                <?php 
            }
            ?>
            </ul>
            <br style="clear:both;"/>
            <?php 
        }
        if (empty($addon_name)) {
            self::gravityforms_settings_page();
        } else {
            do_action("gform_settings_" . str_replace(" ", "_", $addon_name));
        }
    }
开发者ID:hypenotic,项目名称:slowfood,代码行数:59,代码来源:settings.php


示例7: plugin_settings_init

 protected function plugin_settings_init()
 {
     $subview = rgget("subview");
     RGForms::add_settings_page(array('name' => __("Gravity Forms API Settings", "gravityforms"), 'tab_label' => $this->get_short_title(), 'handler' => array($this, 'plugin_settings_page')));
     if (rgget("page") == "gf_settings" && $subview == $this->get_short_title() && $this->current_user_can_any($this->_capabilities_settings_page)) {
         require_once GFCommon::get_base_path() . "/tooltips.php";
     }
 }
开发者ID:tlandn,项目名称:akvo-web,代码行数:8,代码来源:webapi.php


示例8: admin_init

 public function admin_init()
 {
     if ('gf_edit_forms' == RGForms::get('page') && '' == rgget('view') && is_numeric(rgget('id'))) {
         add_filter('gform_toolbar_menu', array($this, 'gform_toolbar_menu'), 10, 2);
         add_action('gform_editor_js', array($this, 'gform_editor_js'));
         add_filter('gform_noconflict_scripts', array($this, 'gform_noconflict_scripts'));
     }
 }
开发者ID:jbeyta,项目名称:joelandsam,代码行数:8,代码来源:toggle-all-fields-required.php


示例9: add_field_option

 public function add_field_option()
 {
     if (is_admin() && 'gf_edit_forms' == RGForms::get('page')) {
         add_action('gform_field_advanced_settings', array($this, 'gform_field_advanced_settings'), 10, 2);
         add_filter('gform_tooltips', array($this, 'gform_tooltips'));
         add_action('gform_editor_js', array($this, 'gform_editor_js'));
         add_filter('gform_noconflict_scripts', array($this, 'gform_noconflict_scripts'));
     }
 }
开发者ID:jbeyta,项目名称:joelandsam,代码行数:9,代码来源:redact.php


示例10: get_form_parent_post_id

 function get_form_parent_post_id($form)
 {
     foreach ($form['fields'] as $field) {
         if ($field['type'] == 'select' && $field['setParentPost']) {
             $parent_id = RGForms::post('input_' . $field['id']);
             return $parent_id;
         }
     }
     return 0;
 }
开发者ID:adisonc,项目名称:MaineLearning,代码行数:10,代码来源:gfcptaddon_1-5.php


示例11: settings_page

 public static function settings_page()
 {
     if (class_exists('RGForms') && RGForms::get("page") == "gf_settings") {
         /* 
          * Tell Gravity Forms to initiate our settings page
          * Using the following Class/Model
          */
         RGForms::add_settings_page('PDF', array(self::$model, 'gfpdf_settings_page'));
     }
 }
开发者ID:Ezyva2015,项目名称:SMSF-Academy-Wordpress,代码行数:10,代码来源:pdf-settings.php


示例12: scripts_styles

 /**
  * load JS for fields.
  *
  * @param  string $hook  The admin page we are on.
  *
  * @return void
  */
 public function scripts_styles($hook)
 {
     // Bail if not on the GF page.
     if (!RGForms::is_gravity_page()) {
         return;
     }
     // Enqueue our items.
     wp_enqueue_script('gftips-admin', plugins_url('/js/gftips.admin.js', __FILE__), array('jquery'), GFT_VER, true);
     wp_localize_script('gftips-admin', 'gftipsAdmin', array('fldTypes' => self::show_field_item_types()));
 }
开发者ID:bself,项目名称:nuimage-wp,代码行数:17,代码来源:admin.php


示例13: adminInit

 /**
  * handle admin init action
  */
 public function adminInit()
 {
     if (isset($_GET['page'])) {
         switch ($_GET['page']) {
             case 'gf_settings':
                 // add our settings page to the Gravity Forms settings menu
                 RGForms::add_settings_page('eWAY Payments', array($this, 'settingsPage'));
                 break;
         }
     }
     add_settings_section(GFEWAY_PLUGIN_OPTIONS, false, false, GFEWAY_PLUGIN_OPTIONS);
     register_setting(GFEWAY_PLUGIN_OPTIONS, GFEWAY_PLUGIN_OPTIONS, array($this, 'settingsValidate'));
 }
开发者ID:Ezyva2015,项目名称:SMSF-Academy-Wordpress,代码行数:16,代码来源:class.GFEwayAdmin.php


示例14: init

 public static function init()
 {
     global $pagenow;
     if ($pagenow == 'plugins.php' || defined('RG_CURRENT_PAGE') && RG_CURRENT_PAGE == "plugins.php") {
         //loading translations
         load_plugin_textdomain('gravity-forms-exacttarget', FALSE, '/gravity-forms-exacttarget/languages');
         add_action('after_plugin_row_' . self::$path, array('GFExactTarget', 'plugin_row'));
         add_filter('plugin_action_links', array('GFExactTarget', 'settings_link'), 10, 2);
     }
     if (!self::is_gravityforms_supported()) {
         return;
     }
     if (is_admin()) {
         //loading translations
         load_plugin_textdomain('gravity-forms-exacttarget', FALSE, '/gravity-forms-exacttarget/languages');
         add_filter("transient_update_plugins", array('GFExactTarget', 'check_update'));
         #add_filter("site_transient_update_plugins", array('GFExactTarget', 'check_update'));
         //creates a new Settings page on Gravity Forms' settings screen
         if (self::has_access("gravityforms_exacttarget")) {
             RGForms::add_settings_page("ExactTarget", array("GFExactTarget", "settings_page"), self::get_base_url() . "/images/exacttarget_wordpress_icon_32.png");
         }
     }
     //integrating with Members plugin
     if (function_exists('members_get_capabilities')) {
         add_filter('members_get_capabilities', array("GFExactTarget", "members_get_capabilities"));
     }
     //creates the subnav left menu
     add_filter("gform_addon_navigation", array('GFExactTarget', 'create_menu'));
     if (self::is_exacttarget_page()) {
         //enqueueing sack for AJAX requests
         wp_enqueue_script(array("sack"));
         //loading data lib
         require_once self::get_base_path() . "/data.php";
         //loading Gravity Forms tooltips
         require_once GFCommon::get_base_path() . "/tooltips.php";
         add_filter('gform_tooltips', array('GFExactTarget', 'tooltips'));
         //runs the setup when version changes
         self::setup();
     } else {
         if (in_array(RG_CURRENT_PAGE, array("admin-ajax.php"))) {
             //loading data class
             require_once self::get_base_path() . "/data.php";
             add_action('wp_ajax_rg_update_feed_active', array('GFExactTarget', 'update_feed_active'));
             add_action('wp_ajax_gf_select_exacttarget_form', array('GFExactTarget', 'select_exacttarget_form'));
         } else {
             //handling post submission.
             add_action("gform_post_submission", array('GFExactTarget', 'export'), 10, 2);
         }
     }
 }
开发者ID:thirdwunder,项目名称:Gravity-Forms-ExactTarget,代码行数:50,代码来源:exacttarget.php


示例15: ddw_gftb_add_gfsettings

/**
 * Hook in our plugin's settings page also on the Gravity Forms settings page as
 *    a sub page.
 *
 * @since 1.6.0
 *
 * @uses  is_admin()
 * @uses  RGForms::add_settings_page()
 */
function ddw_gftb_add_gfsettings()
{
    if (is_admin() && class_exists('RGForms')) {
        global $pagenow;
        $gftb_gf_settings_string = array('name' => 'Toolbar', 'tab_label' => _x('Toolbar', 'Translators: Settings (sub) title within Gravity Forms settings page', 'gravity-forms-toolbar'), 'handler' => 'ddw_gftb_options_page', 'icon_path' => '');
        RGForms::add_settings_page($gftb_gf_settings_string, 'ddw_gftb_options_page', '');
        /** Add & display message on saving options */
        if (isset($_GET['subview']) && 'Toolbar' == $_GET['subview'] && isset($_GET['settings-updated'])) {
            add_action('admin_notices', 'ddw_gftb_settings_message');
        }
        // end if
    }
    // end if
}
开发者ID:EasyDayCleaning,项目名称:Easy-Day-Team2,代码行数:23,代码来源:gftb-admin-settings.php


示例16: content

 function content($block)
 {
     $form_id = parent::get_setting($block, 'form-id', null);
     //If no form ID is present, display the message and stop this function.
     if (!$form_id) {
         echo '<p>There is no form to display.</p>';
         return;
     }
     $display_title = parent::get_setting($block, 'display-title', true);
     $display_description = parent::get_setting($block, 'display-description', true);
     $force_display = true;
     $field_values = null;
     $use_ajax = parent::get_setting($block, 'use-ajax', false);
     echo RGForms::get_form($form_id, $display_title, $display_description, $force_display, null, $use_ajax);
 }
开发者ID:danaiser,项目名称:hollandLawns,代码行数:15,代码来源:gravity-forms.php


示例17: get_field_input

 public function get_field_input($form, $value = '', $entry = null)
 {
     if (is_array($value)) {
         $value = array_values($value);
     }
     $form_id = $form['id'];
     $is_entry_detail = $this->is_entry_detail();
     $is_form_editor = $this->is_form_editor();
     $is_admin = $is_entry_detail || $is_form_editor;
     $id = (int) $this->id;
     $field_id = $is_entry_detail || $is_form_editor || $form_id == 0 ? "input_{$id}" : 'input_' . $form_id . "_{$id}";
     $class_suffix = $is_entry_detail ? '_admin' : '';
     $form_sub_label_placement = rgar($form, 'subLabelPlacement');
     $field_sub_label_placement = $this->subLabelPlacement;
     $is_sub_label_above = $field_sub_label_placement == 'above' || empty($field_sub_label_placement) && $form_sub_label_placement == 'above';
     $sub_label_class_attribute = $field_sub_label_placement == 'hidden_label' ? "class='hidden_sub_label'" : '';
     $disabled_text = $is_form_editor ? 'disabled="disabled"' : '';
     $first_tabindex = $this->get_tabindex();
     $last_tabindex = $this->get_tabindex();
     $strength_style = !$this->passwordStrengthEnabled ? "style='display:none;'" : '';
     $strength_indicator_label = __('Strength indicator', 'gravityforms');
     $strength = $this->passwordStrengthEnabled || $is_admin ? "<div id='{$field_id}_strength_indicator' class='gfield_password_strength' {$strength_style}>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{$strength_indicator_label}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input type='hidden' class='gform_hidden' id='{$field_id}_strength' name='input_{$id}_strength' />" : '';
     $action = !$is_admin ? "gformShowPasswordStrength(\"{$field_id}\");" : '';
     $onchange = $this->passwordStrengthEnabled ? "onchange='{$action}'" : '';
     $onkeyup = $this->passwordStrengthEnabled ? "onkeyup='{$action}'" : '';
     $confirmation_value = RGForms::post('input_' . $id . '_2');
     $password_value = is_array($value) ? $value[0] : $value;
     $password_value = esc_attr($password_value);
     $confirmation_value = esc_attr($confirmation_value);
     $enter_password_field_input = GFFormsModel::get_input($this, $this->id . '');
     $confirm_password_field_input = GFFormsModel::get_input($this, $this->id . '.2');
     $enter_password_label = rgar($enter_password_field_input, 'customLabel') != '' ? $enter_password_field_input['customLabel'] : __('Enter Password', 'gravityforms');
     $enter_password_label = apply_filters("gform_password_{$form_id}", apply_filters('gform_password', $enter_password_label, $form_id), $form_id);
     $confirm_password_label = rgar($confirm_password_field_input, 'customLabel') != '' ? $confirm_password_field_input['customLabel'] : __('Confirm Password', 'gravityforms');
     $confirm_password_label = apply_filters("gform_password_confirm_{$form_id}", apply_filters('gform_password_confirm', $confirm_password_label, $form_id), $form_id);
     $enter_password_placeholder_attribute = GFCommon::get_input_placeholder_attribute($enter_password_field_input);
     $confirm_password_placeholder_attribute = GFCommon::get_input_placeholder_attribute($confirm_password_field_input);
     if ($is_sub_label_above) {
         return "<div class='ginput_complex{$class_suffix} ginput_container' id='{$field_id}_container'>\n\t\t\t\t\t<span id='{$field_id}_container' class='ginput_left'>\n\t\t\t\t\t\t<label for='{$field_id}' {$sub_label_class_attribute}>{$enter_password_label}</label>\n\t\t\t\t\t\t<input type='password' name='input_{$id}' id='{$field_id}' {$onkeyup} {$onchange} value='{$password_value}' {$first_tabindex} {$enter_password_placeholder_attribute} {$disabled_text}/>\n\t\t\t\t\t</span>\n\t\t\t\t\t<span id='{$field_id}_2_container' class='ginput_right'>\n\t\t\t\t\t\t<label for='{$field_id}_2' {$sub_label_class_attribute}>{$confirm_password_label}</label>\n\t\t\t\t\t\t<input type='password' name='input_{$id}_2' id='{$field_id}_2' {$onkeyup} {$onchange} value='{$confirmation_value}' {$last_tabindex} {$confirm_password_placeholder_attribute} {$disabled_text}/>\n\t\t\t\t\t</span>\n\t\t\t\t\t<div class='gf_clear gf_clear_complex'></div>\n\t\t\t\t</div>{$strength}";
     } else {
         return "<div class='ginput_complex{$class_suffix} ginput_container' id='{$field_id}_container'>\n\t\t\t\t\t<span id='{$field_id}_container' class='ginput_left'>\n\t\t\t\t\t\t<input type='password' name='input_{$id}' id='{$field_id}' {$onkeyup} {$onchange} value='{$password_value}' {$first_tabindex} {$enter_password_placeholder_attribute} {$disabled_text}/>\n\t\t\t\t\t\t<label for='{$field_id}' {$sub_label_class_attribute}>{$enter_password_label}</label>\n\t\t\t\t\t</span>\n\t\t\t\t\t<span id='{$field_id}_2_container' class='ginput_right'>\n\t\t\t\t\t\t<input type='password' name='input_{$id}_2' id='{$field_id}_2' {$onkeyup} {$onchange} value='{$confirmation_value}' {$last_tabindex} {$confirm_password_placeholder_attribute} {$disabled_text}/>\n\t\t\t\t\t\t<label for='{$field_id}_2' {$sub_label_class_attribute}>{$confirm_password_label}</label>\n\t\t\t\t\t</span>\n\t\t\t\t\t<div class='gf_clear gf_clear_complex'></div>\n\t\t\t\t</div>{$strength}";
     }
 }
开发者ID:anucha-digitalnoir,项目名称:freighthub-logistic,代码行数:43,代码来源:class-gf-field-password.php


示例18: widget

 function widget($args, $instance)
 {
     extract($args);
     echo $before_widget;
     $title = apply_filters('widget_title', $instance['title']);
     if ($title) {
         echo $before_title . $title . $after_title;
     }
     $tabindex = is_numeric($instance['tabindex']) ? $instance['tabindex'] : 1;
     //creating form
     $form = RGFormsModel::get_form_meta($instance['form_id']);
     if (empty($instance['disable_scripts']) && !is_admin()) {
         RGForms::print_form_scripts($form, $instance['ajax']);
     }
     $form_markup = RGForms::get_form($instance['form_id'], $instance['showtitle'], $instance['showdescription'], false, null, $instance['ajax'], $tabindex);
     //display form
     echo $form_markup;
     echo $after_widget;
 }
开发者ID:Junaid-Farid,项目名称:gocnex,代码行数:19,代码来源:widget.php


示例19: __construct

 /**
  * Constructor: setup callbacks and plugin-specific options
  *
  * @author James Inman
  */
 public function __construct()
 {
     parent::__construct();
     // Set the plugin's Clockwork SMS menu to load the contact forms
     $this->plugin_callback = array($this, 'clockwork_gravityforms');
     $this->plugin_dir = basename(dirname(__FILE__));
     // Convert the old settings
     $this->convert_old_settings();
     // Setup all forms into a local variable
     if (!class_exists('RGForms')) {
         require_once dirname(dirname(__FILE__)) . '/gravityforms/gravityforms.php';
     }
     if (!class_exists('RGFormsModel')) {
         require_once dirname(dirname(__FILE__)) . '/gravityforms/forms_model.php';
     }
     $active = RGForms::get('active') == '' ? null : RGForms::get('active');
     $this->forms = RGFormsModel::get_forms($active, 'title');
     // Options and callbacks
     add_action('gform_post_submission', array(&$this, 'do_form_processing'), 10, 2);
 }
开发者ID:jekv,项目名称:devia,代码行数:25,代码来源:main.php


示例20: widget

 function widget($args, $instance)
 {
     extract($args);
     echo $before_widget;
     $title = apply_filters('widget_title', $instance['title']);
     if ($title) {
         echo $before_title . $title . $after_title;
     }
     $form = RGForms::get_form($instance['form'], $instance['showtitle'], $instance['showdesc']);
     // Fix the tab indices
     preg_match_all("/tabindex='([0-9]+)'/", $form, $matches, PREG_SET_ORDER);
     $diff = $instance['tabindex'] - $matches[0][1];
     foreach ($matches as $match) {
         $newtabindex = str_replace($match[1], $match[1] + $diff, $match[0]);
         $form = str_replace($match[0], $newtabindex, $form);
     }
     // Output the form
     echo $form;
     echo $after_widget;
 }
开发者ID:rongandat,项目名称:cyarevfoods,代码行数:20,代码来源:gravity-forms-widget.php



注:本文中的RGForms类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP RGFormsModel类代码示例发布时间:2022-05-23
下一篇:
PHP RGCurrency类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap