當前位置: 首頁>>代碼示例>>PHP>>正文


PHP GFFormDisplay::get_max_field_id方法代碼示例

本文整理匯總了PHP中GFFormDisplay::get_max_field_id方法的典型用法代碼示例。如果您正苦於以下問題:PHP GFFormDisplay::get_max_field_id方法的具體用法?PHP GFFormDisplay::get_max_field_id怎麽用?PHP GFFormDisplay::get_max_field_id使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在GFFormDisplay的用法示例。


在下文中一共展示了GFFormDisplay::get_max_field_id方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: render

 public function render($form, $ajax)
 {
     if (!class_exists('GFFormDisplay') || self::isDisabled()) {
         return $form;
     }
     self::enqueueScripts($form, $ajax);
     self::updateRenderedCount();
     $next = GFFormDisplay::get_max_field_id($form) + 1;
     $template = sprintf($this->template, get_option('rg_gforms_captcha_public_key'));
     $opts = array('type' => 'section', '_is_entry_detail' => NULL, 'id' => $next, 'label' => '', 'adminLabel' => '', 'isRequired' => false, 'size' => 'medium', 'errorMessage' => '', 'inputs' => NULL, 'displayOnly' => true, 'labelPlacement' => '', 'content' => '', 'formId' => $form['id'], 'pageNumber' => GFFormDisplay::get_current_page($form['id']), 'conditionalLogic' => '', 'cssClass' => $this->buCAPTCHAIdentifier . '_section');
     $form['fields'][] = GF_Fields::create($opts);
     $captcha_opts = array('type' => 'html', 'id' => $next + 1, 'content' => apply_filters('bu_gravityforms_global_recaptcha_div', $template), 'cssClass' => $this->buCAPTCHAIdentifier);
     $form['fields'][] = GF_Fields::create(array_merge($opts, $captcha_opts));
     return $form;
 }
開發者ID:bu-ist,項目名稱:gravityforms-require-captcha,代碼行數:15,代碼來源:class-bu-gf-recaptcha.php

示例2: maybe_validate

 /**
  * Check if the rest of the form has passed validation, is the last page, and that the honeypot field has not been completed.
  *
  * @param array $validation_result Contains the validation result, the form object, and the failed validation page number.
  *
  * @return array $validation_result
  */
 public function maybe_validate($validation_result)
 {
     $form = $validation_result['form'];
     $is_last_page = GFFormDisplay::is_last_page($form);
     $failed_honeypot = false;
     if ($is_last_page && rgar($form, 'enableHoneypot')) {
         $honeypot_id = GFFormDisplay::get_max_field_id($form) + 1;
         $failed_honeypot = !rgempty("input_{$honeypot_id}");
     }
     if (!$validation_result['is_valid'] || !$is_last_page || $failed_honeypot) {
         return $validation_result;
     }
     return $this->validation($validation_result);
 }
開發者ID:slavic18,項目名稱:cats,代碼行數:21,代碼來源:class-gf-payment-addon.php

示例3: maybe_validate

 /**
  * Check if the rest of the form has passed validation, is the last page, and that the honeypot field has not been completed.
  *
  * @param array $validation_result Contains the validation result, the form object, and the failed validation page number.
  *
  * @return array $validation_result
  */
 public function maybe_validate($validation_result)
 {
     $form = $validation_result['form'];
     $is_last_page = GFFormDisplay::is_last_page($form);
     $failed_honeypot = false;
     if ($is_last_page && rgar($form, 'enableHoneypot')) {
         $honeypot_id = GFFormDisplay::get_max_field_id($form) + 1;
         $failed_honeypot = !rgempty("input_{$honeypot_id}");
     }
     $is_heartbeat = rgpost('action') == 'heartbeat';
     // Validation called by partial entries feature via the heartbeat API.
     if (!$validation_result['is_valid'] || !$is_last_page || $failed_honeypot || $is_heartbeat) {
         return $validation_result;
     }
     return $this->validation($validation_result);
 }
開發者ID:fjbeteiligung,項目名稱:development,代碼行數:23,代碼來源:class-gf-payment-addon.php

示例4: is_ready_for_capture

 private static function is_ready_for_capture($validation_result)
 {
     $form = $validation_result['form'];
     $is_last_page = GFFormDisplay::is_last_page($form);
     $failed_honeypot = false;
     if ($is_last_page && rgar($form, 'enableHoneypot')) {
         $honeypot_id = GFFormDisplay::get_max_field_id($form) + 1;
         $failed_honeypot = !rgempty("input_{$honeypot_id}");
     }
     $is_heartbeat = rgpost('action') == 'heartbeat';
     // Validation called by partial entries feature via the heartbeat API.
     if (!$validation_result['is_valid'] || !$is_last_page || $failed_honeypot || $is_heartbeat) {
         return false;
     }
     //getting config that matches condition (if conditions are enabled)
     $config = self::get_config($validation_result["form"]);
     if (!$config) {
         return false;
     }
     //making sure credit card field is visible
     $creditcard_field = self::get_creditcard_field($validation_result["form"]);
     if (RGFormsModel::is_field_hidden($validation_result["form"], $creditcard_field, array())) {
         return false;
     }
     return $config;
 }
開發者ID:wp-premium,項目名稱:gravityformspaypalpro,代碼行數:26,代碼來源:paypalpro.php


注:本文中的GFFormDisplay::get_max_field_id方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。