当前位置: 首页>>代码示例>>PHP>>正文


PHP rgget函数代码示例

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


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

示例1: add_form_options

 public function add_form_options()
 {
     if (is_admin() && 'settings' == rgget('view')) {
         add_filter('gform_form_settings', array($this, 'gform_form_settings'), 10, 2);
         add_filter('gform_pre_form_settings_save', array($this, 'gform_pre_form_settings_save'));
     }
 }
开发者ID:jbeyta,项目名称:joelandsam,代码行数:7,代码来源:prevent-entry-creation.php

示例2: get_field_input

 public function get_field_input($form, $value = '', $entry = null)
 {
     $is_entry_detail = $this->is_entry_detail();
     $is_form_editor = $this->is_form_editor();
     if (is_array($value)) {
         $value = array_values($value);
     }
     $form_id = $form['id'];
     $id = intval($this->id);
     $field_id = $is_entry_detail || $is_form_editor || $form_id == 0 ? "input_{$id}" : 'input_' . $form_id . "_{$id}";
     $form_id = ($is_entry_detail || $is_form_editor) && empty($form_id) ? rgget('id') : $form_id;
     $size = $this->size;
     $disabled_text = $is_form_editor ? "disabled='disabled'" : '';
     $class_suffix = $is_entry_detail ? '_admin' : '';
     $class = $this->emailConfirmEnabled ? '' : $size . $class_suffix;
     //Size only applies when confirmation is disabled
     $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'" : '';
     $html_input_type = RGFormsModel::is_html5_enabled() ? 'email' : 'text';
     $enter_email_field_input = GFFormsModel::get_input($this, $this->id . '');
     $confirm_field_input = GFFormsModel::get_input($this, $this->id . '.2');
     $enter_email_label = rgar($enter_email_field_input, 'customLabel') != '' ? $enter_email_field_input['customLabel'] : __('Enter Email', 'gravityforms');
     $enter_email_label = apply_filters("gform_email_{$form_id}", apply_filters('gform_email', $enter_email_label, $form_id), $form_id);
     $confirm_email_label = rgar($confirm_field_input, 'customLabel') != '' ? $confirm_field_input['customLabel'] : __('Confirm Email', 'gravityforms');
     $confirm_email_label = apply_filters("gform_email_confirm_{$form_id}", apply_filters('gform_email_confirm', $confirm_email_label, $form_id), $form_id);
     $single_placeholder_attribute = $this->get_field_placeholder_attribute();
     $enter_email_placeholder_attribute = $this->get_input_placeholder_attribute($enter_email_field_input);
     $confirm_email_placeholder_attribute = $this->get_input_placeholder_attribute($confirm_field_input);
     if ($is_form_editor) {
         $single_style = $this->emailConfirmEnabled ? "style='display:none;'" : '';
         $confirm_style = $this->emailConfirmEnabled ? '' : "style='display:none;'";
         if ($is_sub_label_above) {
             return "<div class='ginput_container ginput_single_email' {$single_style}>\n                            <input name='input_{$id}' type='{$html_input_type}' class='" . esc_attr($class) . "' disabled='disabled' {$single_placeholder_attribute} />\n                            <div class='gf_clear gf_clear_complex'></div>\n                        </div>\n                        <div class='ginput_complex ginput_container ginput_confirm_email' {$confirm_style} id='{$field_id}_container'>\n                            <span id='{$field_id}_container' class='ginput_left'>\n                                <label for='{$field_id}' {$sub_label_class_attribute}>{$enter_email_label}</label>\n                                <input class='{$class}' type='text' name='input_{$id}' id='{$field_id}' disabled='disabled' {$enter_email_placeholder_attribute}/>\n                            </span>\n                            <span id='{$field_id}_2_container' class='ginput_right'>\n                                <label for='{$field_id}_2' {$sub_label_class_attribute}>{$confirm_email_label}</label>\n                                <input class='{$class}' type='text' name='input_{$id}_2' id='{$field_id}_2' disabled='disabled' {$confirm_email_placeholder_attribute}/>\n                            </span>\n                            <div class='gf_clear gf_clear_complex'></div>\n                        </div>";
         } else {
             return "<div class='ginput_container ginput_single_email' {$single_style}>\n                            <input class='{$class}' name='input_{$id}' type='{$html_input_type}' class='" . esc_attr($class) . "' disabled='disabled' {$single_placeholder_attribute}/>\n                            <div class='gf_clear gf_clear_complex'></div>\n                        </div>\n                        <div class='ginput_complex ginput_container ginput_confirm_email' {$confirm_style} id='{$field_id}_container'>\n                            <span id='{$field_id}_container' class='ginput_left'>\n                                <input class='{$class}' type='text' name='input_{$id}' id='{$field_id}' disabled='disabled' {$enter_email_placeholder_attribute}/>\n                                <label for='{$field_id}' {$sub_label_class_attribute}>{$enter_email_label}</label>\n                            </span>\n                            <span id='{$field_id}_2_container' class='ginput_right'>\n                                <input class='{$class}' type='text' name='input_{$id}_2' id='{$field_id}_2' disabled='disabled' {$confirm_email_placeholder_attribute}/>\n                                <label for='{$field_id}_2' {$sub_label_class_attribute}>{$confirm_email_label}</label>\n                            </span>\n                            <div class='gf_clear gf_clear_complex'></div>\n                        </div>";
         }
     } else {
         $logic_event = $this->get_conditional_logic_event('keyup');
         if ($this->emailConfirmEnabled && !$is_entry_detail) {
             $first_tabindex = $this->get_tabindex();
             $last_tabindex = $this->get_tabindex();
             $email_value = is_array($value) ? esc_attr($value[0]) : $value;
             $confirmation_value = is_array($value) ? esc_attr($value[1]) : rgpost('input_' . $this->id . '_2');
             $confirmation_disabled = $is_entry_detail ? "disabled='disabled'" : $disabled_text;
             if ($is_sub_label_above) {
                 return "<div class='ginput_complex ginput_container' id='{$field_id}_container'>\n                                <span id='{$field_id}_container' class='ginput_left'>\n                                    <label for='{$field_id}'>" . $enter_email_label . "</label>\n                                    <input class='{$class}' type='{$html_input_type}' name='input_{$id}' id='{$field_id}' value='" . $email_value . "' {$first_tabindex} {$logic_event} {$disabled_text} {$enter_email_placeholder_attribute}/>\n                                </span>\n                                <span id='{$field_id}_2_container' class='ginput_right'>\n                                    <label for='{$field_id}_2' {$sub_label_class_attribute}>{$confirm_email_label}</label>\n                                    <input class='{$class}' type='{$html_input_type}' name='input_{$id}_2' id='{$field_id}_2' value='" . $confirmation_value . "' {$last_tabindex} {$confirmation_disabled} {$confirm_email_placeholder_attribute}/>\n                                </span>\n                                <div class='gf_clear gf_clear_complex'></div>\n                            </div>";
             } else {
                 return "<div class='ginput_complex ginput_container' id='{$field_id}_container'>\n                                <span id='{$field_id}_container' class='ginput_left'>\n                                    <input class='{$class}' type='{$html_input_type}' name='input_{$id}' id='{$field_id}' value='" . $email_value . "' {$first_tabindex} {$logic_event} {$disabled_text} {$enter_email_placeholder_attribute}/>\n                                    <label for='{$field_id}' {$sub_label_class_attribute}>{$enter_email_label}</label>\n                                </span>\n                                <span id='{$field_id}_2_container' class='ginput_right'>\n                                    <input class='{$class}' type='{$html_input_type}' name='input_{$id}_2' id='{$field_id}_2' value='" . $confirmation_value . "' {$last_tabindex} {$confirmation_disabled} {$confirm_email_placeholder_attribute}/>\n                                    <label for='{$field_id}_2' {$sub_label_class_attribute}>{$confirm_email_label}</label>\n                                </span>\n                                <div class='gf_clear gf_clear_complex'></div>\n                            </div>";
             }
         } else {
             $tabindex = $this->get_tabindex();
             $value = esc_attr($value);
             $class = esc_attr($class);
             return "<div class='ginput_container'>\n                            <input name='input_{$id}' id='{$field_id}' type='{$html_input_type}' value='{$value}' class='{$class}' {$tabindex} {$logic_event} {$disabled_text} {$single_placeholder_attribute}/>\n                        </div>";
         }
     }
 }
开发者ID:anucha-digitalnoir,项目名称:freighthub-logistic,代码行数:59,代码来源:class-gf-field-email.php

示例3: 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

示例4: rgempty

 /**
  * @param      $name
  * @param null $array
  *
  * @return bool
  */
 function rgempty($name, $array = null)
 {
     if (!$array) {
         $array = $_POST;
     }
     $val = rgget($name, $array);
     return empty($val);
 }
开发者ID:braddalton,项目名称:Gravity-Forms-Stripe,代码行数:14,代码来源:gf-utility-functions.php

示例5: bb_click_array_field_input

function bb_click_array_field_input($input, $field, $value, $lead_id, $form_id)
{
    if ($field["type"] == "bb_click_array") {
        $field_id = IS_ADMIN || $form_id == 0 ? "input_{$id}" : "input_" . $form_id . "_{$id}";
        $input_name = $form_id . '_' . $field["id"];
        $css = isset($field['cssClass']) ? $field['cssClass'] : "";
        $disabled_text = IS_ADMIN && RG_CURRENT_VIEW != "entry" ? "disabled='disabled'" : "";
        $amount = '';
        $clicked = '';
        if (is_array($value)) {
            $amount = esc_attr(rgget($field["id"] . ".1", $value));
            $clicked = rgget($field["id"] . ".5", $value);
        }
        $html = "<div id='{$field_id}' class='ginput_container bb-click-array-" . count($field['choices']) . " " . esc_attr($css) . "'>" . "\n";
        if (is_array($field["choices"])) {
            $choice_id = 0;
            $tabindex = GFCommon::get_tabindex();
            foreach ($field["choices"] as $choice) {
                $id = $field["id"] . '_' . $choice_id;
                $field_value = !empty($choice["value"]) || rgar($field, "enableChoiceValue") ? $choice["value"] : $choice["text"];
                if (rgblank($amount) && RG_CURRENT_VIEW != "entry") {
                    $active = rgar($choice, "isSelected") ? "checked='checked'" : "";
                } else {
                    $active = RGFormsModel::choice_value_match($field, $choice, $amount) ? "checked='checked'" : "";
                }
                if ($active) {
                    $amount = $field_value;
                }
                $field_class = $active ? 's-active' : 's-passive';
                if (rgar($field, 'field_bb_click_array_is_product')) {
                    require_once GFCommon::get_base_path() . '/currency.php';
                    $currency = new RGCurrency(GFCommon::get_currency());
                    $field_value = $currency->to_money($field_value);
                    $field_class .= ' s-currency';
                }
                $html .= sprintf('<div data-clickarray-value="%s" data-choice-id="%s" class="s-html-wrapper %s" id="%s">', esc_attr($field_value), $choice_id, $field_class, $id);
                $html .= sprintf('<div class="s-html-value">%s</div>', $field_value);
                $html .= sprintf("<label for='choice_%s' id='label_%s'>%s</label>", $id, $id, $choice["text"]);
                $html .= '</div>';
                $choice_id++;
            }
            $onblur = !IS_ADMIN ? 'if(jQuery(this).val().replace(" ", "") == "") { jQuery(this).val("' . $other_default_value . '"); }' : '';
            $onkeyup = empty($field["conditionalLogicFields"]) || IS_ADMIN ? '' : "onchange='gf_apply_rules(" . $field["formId"] . "," . GFCommon::json_encode($field["conditionalLogicFields"]) . ");' onkeyup='clearTimeout(__gf_timeout_handle); __gf_timeout_handle = setTimeout(\"gf_apply_rules(" . $field["formId"] . "," . GFCommon::json_encode($field["conditionalLogicFields"]) . ")\", 300);'";
            $value_exists = RGFormsModel::choices_value_match($field, $field["choices"], $value);
            $other_label = empty($field['field_bb_click_array_other_label']) ? 'My Best Gift' : $field['field_bb_click_array_other_label'];
            $other_class = rgar($field, 'enableOtherChoice') ? '' : 'hide';
            $html .= "<label for='input_{$field["formId"]}_{$field["id"]}_1' class='ginput_bb_click_array_other_label " . $other_class . "'>" . $other_label . "</label>";
            $other_class .= rgar($field, 'field_bb_click_array_is_product') ? ' ginput_amount gfield_price gfield_price_' . $field['formId'] . '_' . $field['id'] . '_1 gfield_product_' . $field['formId'] . '_' . $field['id'] . '_1' : '';
            $html .= "<input id='input_{$field["formId"]}_{$field["id"]}_1' name='input_{$field["id"]}_1' type='text' value='" . esc_attr($amount) . "' class='ginput_bb ginput_click_array_other " . $other_class . " " . $field['size'] . "' onblur='{$onblur}' {$tabindex} {$onkeyup} {$disabled_text}>";
            $html .= "<input id='input_{$field["formId"]}_{$field["id"]}_5' name='input_{$field["id"]}_5' type='hidden' value='" . esc_attr($clicked) . "' class='ginput_bb ginput_click_array_clicked'>";
        }
        $html .= "</div>";
        return $html;
    }
    return $input;
}
开发者ID:BrownBox,项目名称:bb-click-array,代码行数:56,代码来源:gravity-form-field.php

示例6: init_admin

 public static function init_admin()
 {
     $admin_page = rgget('page');
     if ($admin_page == 'gf_edit_forms' && !empty($_GET['id'])) {
         add_action('gform_field_standard_settings', array('GF_Field_Repeater_End', 'gform_standard_settings'), 10, 2);
         add_action('gform_field_appearance_settings', array('GF_Field_Repeater_End', 'gform_appearance_settings'), 10, 2);
         add_action('gform_editor_js', array('GF_Field_Repeater_End', 'gform_editor'));
         add_filter('gform_tooltips', array('GF_Field_Repeater_End', 'gform_tooltips'));
     }
 }
开发者ID:kodie,项目名称:gravityforms-repeater,代码行数:10,代码来源:class-gf-field-repeater-end.php

示例7: validate

 public function validate($value, $form)
 {
     $quantity_id = $this->id . '.3';
     $quantity = rgget($quantity_id, $value);
     if ($this->isRequired && rgblank($quantity) && !$this->disableQuantity) {
         $this->failed_validation = true;
         $this->validation_message = empty($this->errorMessage) ? esc_html__('This field is required.', 'gravityforms') : $this->errorMessage;
     } elseif (!empty($quantity) && (!is_numeric($quantity) || intval($quantity) != floatval($quantity) || intval($quantity) < 0)) {
         $this->failed_validation = true;
         $this->validation_message = esc_html__('Please enter a valid quantity', 'gravityforms');
     }
 }
开发者ID:kidaak,项目名称:gravityforms,代码行数:12,代码来源:class-gf-field-calculation.php

示例8: settings_page

 public static function settings_page()
 {
     /*
      * Initialise Formidable Settings Page
      */
     if (rgget('page') == 'formidable-settings') {
         /*
          * Add Formidable Settings Page
          */
         add_filter('frm_add_settings_section', 'FPPDF_Settings::add_settings_page');
     }
 }
开发者ID:vfontjr,项目名称:formidable-pro-pdf-extended,代码行数:12,代码来源:pdf-settings.php

示例9: get_ids

 /**
  * Takes over for setup_ids() but is now called much earlier in the process 
  * @return Boolean whether settings the ids was successful or not
  */
 public static function get_ids()
 {
     global $form_id, $lead_id, $lead_ids;
     $form_id = $form_id ? $form_id : absint(rgget("fid"));
     $lead_ids = $lead_id ? array($lead_id) : explode(',', rgget("lid"));
     /**
      * If form ID and lead ID hasn't been set stop the PDF from attempting to generate
      */
     if (empty($form_id) || empty($lead_ids)) {
         return false;
     }
     return true;
 }
开发者ID:Ezyva2015,项目名称:SMSF-Academy-Wordpress,代码行数:17,代码来源:pdf-common.php

示例10: setup_ids

 public static function setup_ids()
 {
     global $form_id, $lead_id, $lead_ids;
     $form_id = $form_id ? $form_id : absint(rgget("fid"));
     $lead_ids = $lead_id ? array($lead_id) : explode(',', rgget("lid"));
     /**
      * If form ID and lead ID hasn't been set stop the PDF from attempting to generate
      */
     if (empty($form_id) || empty($lead_ids)) {
         trigger_error(__('Form Id and Lead Id are required parameters.', "formidablepropdfextended"));
         return;
     }
 }
开发者ID:vfontjr,项目名称:formidable-pro-pdf-extended,代码行数:13,代码来源:pdf-common.php

示例11: process_exterior_pages

function process_exterior_pages()
{
    if (rgempty("gf_pdf", $_GET)) {
        return;
    }
    //ensure users are logged in
    if (!is_user_logged_in()) {
        auth_redirect();
    }
    switch (rgget("gf_pdf")) {
        case "print-entry":
            require_once "render_to_pdf.php";
            break;
    }
    exit;
}
开发者ID:rposborne,项目名称:gravityformspdf,代码行数:16,代码来源:pdf.php

示例12: process_exterior_pages

 public static function process_exterior_pages()
 {
     if (rgempty("gf_page", $_GET)) {
         return;
     }
     //ensure users are logged in
     if (!is_user_logged_in()) {
         auth_redirect();
     }
     switch (rgget("gf_page")) {
         case "directory_columns":
             require_once "select_directory_columns.php";
             break;
     }
     exit;
 }
开发者ID:healthcommcore,项目名称:osnap,代码行数:16,代码来源:edit-form.php

示例13: maybe_process

 /**
  * If the request is for a Gravity Forms file download then validate and deliver.
  *
  * @since 2.0
  */
 public static function maybe_process()
 {
     if (isset($_GET['gf-download'])) {
         $file = $_GET['gf-download'];
         $form_id = rgget('form-id');
         $field_id = rgget('field-id');
         if (empty($file) || empty($form_id)) {
             return;
         }
         $hash = rgget('hash');
         if (self::validate_download($form_id, $field_id, $file, $hash)) {
             self::deliver($form_id, $file);
         } else {
             self::die_401();
         }
     }
 }
开发者ID:SayenkoDesign,项目名称:ividf,代码行数:22,代码来源:class-gf-download.php

示例14: gform_default_entry_content

function gform_default_entry_content($form, $entry, $entry_ids)
{
    $page_break = rgget('page_break') ? 'print-page-break' : false;
    // Separate each entry inside a form element so radio buttons don't get treated as a single group across multiple entries.
    echo '<form>';
    GFEntryDetail::lead_detail_grid($form, $entry);
    echo '</form>';
    if (rgget('notes')) {
        $notes = RGFormsModel::get_lead_notes($entry['id']);
        if (!empty($notes)) {
            GFEntryDetail::notes_grid($notes, false);
        }
    }
    // output entry divider/page break
    if (array_search($entry['id'], $entry_ids) < count($entry_ids) - 1) {
        echo '<div class="print-hr ' . $page_break . '"></div>';
    }
}
开发者ID:slavic18,项目名称:cats,代码行数:18,代码来源:print-entry.php

示例15: deliver

 /**
  * Send the file.
  *
  * @param $form_id
  * @param $file
  */
 private static function deliver($form_id, $file)
 {
     $path = GFFormsModel::get_upload_path($form_id);
     $file_path = trailingslashit($path) . $file;
     if (file_exists($file_path)) {
         $content_type = self::get_content_type($file_path);
         $content_disposition = rgget('dl') ? 'attachment' : 'inline';
         nocache_headers();
         header('Robots: none');
         header('Content-Type: ' . $content_type);
         header('Content-Description: File Transfer');
         header('Content-Disposition: ' . $content_disposition . '; filename="' . basename($file) . '"');
         header('Content-Transfer-Encoding: binary');
         self::readfile_chunked($file_path);
         die;
     } else {
         self::die_404();
     }
 }
开发者ID:arobbins,项目名称:spellestate,代码行数:25,代码来源:class-gf-download.php


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