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


PHP RGFormsModel::insert_form方法代码示例

本文整理汇总了PHP中RGFormsModel::insert_form方法的典型用法代码示例。如果您正苦于以下问题:PHP RGFormsModel::insert_form方法的具体用法?PHP RGFormsModel::insert_form怎么用?PHP RGFormsModel::insert_form使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在RGFormsModel的用法示例。


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

示例1: save_form_info

 /**
  * Saves form meta. Note the special requirements for the meta string.
  *
  * @param        $id
  * @param string $form_json A valid JSON string. The JSON is manipulated before decoding and is designed to work together with jQuery.toJSON() rather than json_encode. Avoid using json_encode as it will convert unicode characters into their respective entities with slashes. These slashes get stripped so unicode characters won't survive intact.
  *
  * @return array
  */
 public static function save_form_info($id, $form_json)
 {
     global $wpdb;
     $form_json = stripslashes($form_json);
     $form_json = nl2br($form_json);
     GFCommon::log_debug('GFFormDetail::save_form_info(): Form meta json: ' . $form_json);
     $form_meta = json_decode($form_json, true);
     $form_meta = GFFormsModel::convert_field_objects($form_meta);
     GFCommon::log_debug('GFFormDetail::save_form_info(): Form meta => ' . print_r($form_meta, true));
     if (!$form_meta) {
         return array('status' => 'invalid_json', 'meta' => null);
     }
     $form_table_name = $wpdb->prefix . 'rg_form';
     //Making sure title is not duplicate
     $forms = RGFormsModel::get_forms();
     foreach ($forms as $form) {
         if (strtolower($form->title) == strtolower($form_meta['title']) && rgar($form_meta, 'id') != $form->id) {
             return array('status' => 'duplicate_title', 'meta' => $form_meta);
         }
     }
     if ($id > 0) {
         $form_meta = GFFormsModel::trim_form_meta_values($form_meta);
         RGFormsModel::update_form_meta($id, $form_meta);
         //updating form title
         $wpdb->query($wpdb->prepare("UPDATE {$form_table_name} SET title=%s WHERE id=%d", $form_meta['title'], $form_meta['id']));
         $form_meta = RGFormsModel::get_form_meta($id);
         do_action('gform_after_save_form', $form_meta, false);
         return array('status' => $id, 'meta' => $form_meta);
     } else {
         //inserting form
         $id = RGFormsModel::insert_form($form_meta['title']);
         //updating object's id property
         $form_meta['id'] = $id;
         //creating default notification
         if (apply_filters('gform_default_notification', true)) {
             $default_notification = array('id' => uniqid(), 'to' => '{admin_email}', 'name' => __('Admin Notification', 'gravityforms'), 'event' => 'form_submission', 'toType' => 'email', 'subject' => __('New submission from', 'gravityforms') . ' {form_title}', 'message' => '{all_fields}');
             $notifications = array($default_notification['id'] => $default_notification);
             //updating notifications form meta
             RGFormsModel::save_form_notifications($id, $notifications);
         }
         // add default confirmation when saving a new form
         $confirmation_id = uniqid();
         $confirmations = array();
         $confirmations[$confirmation_id] = array('id' => $confirmation_id, 'name' => __('Default Confirmation', 'gravityforms'), 'isDefault' => true, 'type' => 'message', 'message' => __('Thanks for contacting us! We will get in touch with you shortly.', 'gravityforms'), 'url' => '', 'pageId' => '', 'queryString' => '');
         GFFormsModel::save_form_confirmations($id, $confirmations);
         //updating form meta
         RGFormsModel::update_form_meta($id, $form_meta);
         $form_meta = RGFormsModel::get_form_meta($id);
         do_action('gform_after_save_form', $form_meta, true);
         return array('status' => $id * -1, 'meta' => $form_meta);
     }
 }
开发者ID:sbayer55,项目名称:The-Road-Gallery,代码行数:60,代码来源:form_detail.php

示例2: import_file

 public static function import_file($filepath)
 {
     $xmlstr = file_get_contents($filepath);
     require_once "xml.php";
     $options = array("page" => array("unserialize_as_array" => true), "form" => array("unserialize_as_array" => true), "field" => array("unserialize_as_array" => true), "rule" => array("unserialize_as_array" => true), "choice" => array("unserialize_as_array" => true), "input" => array("unserialize_as_array" => true), "routing_item" => array("unserialize_as_array" => true), "routin" => array("unserialize_as_array" => true));
     $xml = new RGXML($options);
     $forms = $xml->unserialize($xmlstr);
     if (!$forms) {
         return 0;
     } else {
         if (version_compare($forms["version"], self::$min_import_version, "<")) {
             return -1;
         }
     }
     //Error. XML version is not compatible with current Gravity Forms version
     //cleaning up generated object
     self::cleanup($forms);
     foreach ($forms as $key => $form) {
         $title = $form["title"];
         $count = 2;
         while (!RGFormsModel::is_unique_title($title)) {
             $title = $form["title"] . "({$count})";
             $count++;
         }
         //inserting form
         $form_id = RGFormsModel::insert_form($title);
         //updating form meta
         $form["title"] = $title;
         $form["id"] = $form_id;
         RGFormsModel::update_form_meta($form_id, $form);
     }
     return sizeof($forms);
 }
开发者ID:hypenotic,项目名称:slowfood,代码行数:33,代码来源:export.php

示例3: import_xml

 public static function import_xml($xmlstr, &$forms = null)
 {
     require_once 'xml.php';
     $options = array('page' => array('unserialize_as_array' => true), 'form' => array('unserialize_as_array' => true), 'field' => array('unserialize_as_array' => true), 'rule' => array('unserialize_as_array' => true), 'choice' => array('unserialize_as_array' => true), 'input' => array('unserialize_as_array' => true), 'routing_item' => array('unserialize_as_array' => true), 'creditCard' => array('unserialize_as_array' => true), 'routin' => array('unserialize_as_array' => true), 'confirmation' => array('unserialize_as_array' => true), 'notification' => array('unserialize_as_array' => true));
     $options = apply_filters('gform_import_form_xml_options', $options);
     $xml = new RGXML($options);
     $forms = $xml->unserialize($xmlstr);
     if (!$forms) {
         return 0;
     } else {
         if (version_compare($forms['version'], self::$min_import_version, '<')) {
             return -1;
         }
     }
     //Error. XML version is not compatible with current Gravity Forms version
     //cleaning up generated object
     self::cleanup($forms);
     foreach ($forms as $key => &$form) {
         $title = $form['title'];
         $count = 2;
         while (!RGFormsModel::is_unique_title($title)) {
             $title = $form['title'] . "({$count})";
             $count++;
         }
         //inserting form
         $form_id = RGFormsModel::insert_form($title);
         //updating form meta
         $form['title'] = $title;
         $form['id'] = $form_id;
         $form = GFFormsModel::trim_form_meta_values($form);
         if (isset($form['confirmations'])) {
             $form['confirmations'] = self::set_property_as_key($form['confirmations'], 'id');
             $form['confirmations'] = GFFormsModel::trim_conditional_logic_values($form['confirmations'], $form);
             GFFormsModel::update_form_meta($form_id, $form['confirmations'], 'confirmations');
             unset($form['confirmations']);
         }
         if (isset($form['notifications'])) {
             $form['notifications'] = self::set_property_as_key($form['notifications'], 'id');
             $form['notifications'] = GFFormsModel::trim_conditional_logic_values($form['notifications'], $form);
             GFFormsModel::update_form_meta($form_id, $form['notifications'], 'notifications');
             unset($form['notifications']);
         }
         RGFormsModel::update_form_meta($form_id, $form);
     }
     return sizeof($forms);
 }
开发者ID:renztoygwapo,项目名称:lincoln,代码行数:46,代码来源:export.php

示例4: save_form_info

 public static function save_form_info($id, $form_json)
 {
     global $wpdb;
     $form_json = stripslashes($form_json);
     //$form_json = preg_replace('|\r\n?|', '\n', $form_json);
     $form_json = nl2br($form_json);
     $form_meta = GFCommon::json_decode($form_json, true);
     if (!$form_meta) {
         return array("status" => "invalid_json", "meta" => null);
     }
     $form_table_name = $wpdb->prefix . "rg_form";
     $meta_table_name = $wpdb->prefix . "rg_form_meta";
     //Making sure title is not duplicate
     $forms = RGFormsModel::get_forms();
     foreach ($forms as $form) {
         if (strtolower($form->title) == strtolower($form_meta["title"]) && $form_meta["id"] != $form->id) {
             return array("status" => "duplicate_title", "meta" => $form_meta);
         }
     }
     if ($id > 0) {
         RGFormsModel::update_form_meta($id, $form_meta);
         //updating form title
         $wpdb->query($wpdb->prepare("UPDATE {$form_table_name} SET title=%s WHERE id=%d", $form_meta["title"], $form_meta["id"]));
         $form_meta = RGFormsModel::get_form_meta($id);
         do_action('gform_after_save_form', $form_meta, false);
         return array("status" => $id, "meta" => $form_meta);
     } else {
         //inserting form
         $id = RGFormsModel::insert_form($form_meta["title"]);
         //updating object's id property
         $form_meta["id"] = $id;
         //creating default notification
         if (apply_filters('gform_default_notification', true)) {
             $form_meta["notification"]["to"] = get_bloginfo("admin_email");
             $form_meta["notification"]["subject"] = __("New submission from", "gravityforms") . " {form_title}";
             $form_meta["notification"]["message"] = "{all_fields}";
         }
         //updating form meta
         RGFormsModel::update_form_meta($id, $form_meta);
         $form_meta = RGFormsModel::get_form_meta($id);
         do_action('gform_after_save_form', $form_meta, true);
         return array("status" => $id * -1, "meta" => $form_meta);
     }
 }
开发者ID:vinvinh315,项目名称:maintainwebsolutions.com,代码行数:44,代码来源:form_detail.php

示例5: add_form

 /**
  * Adds a new form using the given Form object. Warning, little checking is done to make sure it's a valid Form object.
  *
  * @since  1.8
  * @access public
  * @static
  *
  * @param array $form_meta The Form object
  *
  * @return mixed Either the new Form ID or a WP_Error instance
  */
 public static function add_form($form_meta)
 {
     global $wpdb;
     if (!$form_meta || !is_array($form_meta)) {
         return new WP_Error("invalid", __("Invalid form object", "gravityforms"));
     }
     if (rgar($form_meta, "title") == "") {
         return new WP_Error("missing_title", __("The form title is missing", "gravityforms"));
     }
     //Making sure title is not duplicate
     $title = $form_meta["title"];
     $count = 2;
     while (!RGFormsModel::is_unique_title($title)) {
         $title = $form_meta["title"] . "({$count})";
         $count++;
     }
     //inserting form
     $form_id = RGFormsModel::insert_form($title);
     //updating form meta
     $form_meta["title"] = $title;
     //updating object's id property
     $form_meta["id"] = $form_id;
     if (isset($form_meta['confirmations'])) {
         $form_meta['confirmations'] = self::set_property_as_key($form_meta['confirmations'], 'id');
         GFFormsModel::update_form_meta($form_id, $form_meta['confirmations'], 'confirmations');
         unset($form_meta['confirmations']);
     }
     if (isset($form_meta['notifications'])) {
         $form_meta['notifications'] = self::set_property_as_key($form_meta['notifications'], 'id');
         GFFormsModel::update_form_meta($form_id, $form_meta['notifications'], 'notifications');
         unset($form_meta['notifications']);
     }
     //updating form meta
     $result = GFFormsModel::update_form_meta($form_id, $form_meta);
     if (false === $result) {
         return new WP_Error("insert_form_error", __("There was a problem while inserting the form", "gravityforms"), $wpdb->last_error);
     }
     return $form_id;
 }
开发者ID:sashadt,项目名称:wp-deploy-test,代码行数:50,代码来源:api.php

示例6: save_form_info

 /**
  * Saves form meta. Note the special requirements for the meta string.
  *
  * @param $id
  * @param string $form_json A valid JSON string. The JSON is manipulated before decoding and is designed to work together with jQuery.toJSON() rather than json_encode. Avoid using json_encode as it will convert unicode characters into their respective entities with slashes. These slashes get stripped so unicode characters won't survive intact.
  *
  * @return array
  */
 public static function save_form_info($id, $form_json)
 {
     global $wpdb;
     $form_json = stripslashes($form_json);
     $form_json = nl2br($form_json);
     GFCommon::log_debug("form meta json:" . $form_json);
     $form_meta = json_decode($form_json, true);
     GFCommon::log_debug("form meta:");
     GFCommon::log_debug(print_r($form_json, true));
     if (!$form_meta) {
         return array("status" => "invalid_json", "meta" => null);
     }
     $form_table_name = $wpdb->prefix . "rg_form";
     //Making sure title is not duplicate
     $forms = RGFormsModel::get_forms();
     foreach ($forms as $form) {
         if (strtolower($form->title) == strtolower($form_meta["title"]) && rgar($form_meta, "id") != $form->id) {
             return array("status" => "duplicate_title", "meta" => $form_meta);
         }
     }
     if ($id > 0) {
         $form_meta = GFFormsModel::trim_form_meta_values($form_meta);
         RGFormsModel::update_form_meta($id, $form_meta);
         //updating form title
         $wpdb->query($wpdb->prepare("UPDATE {$form_table_name} SET title=%s WHERE id=%d", $form_meta["title"], $form_meta["id"]));
         $form_meta = RGFormsModel::get_form_meta($id);
         do_action('gform_after_save_form', $form_meta, false);
         return array("status" => $id, "meta" => $form_meta);
     } else {
         //inserting form
         $id = RGFormsModel::insert_form($form_meta["title"]);
         //updating object's id property
         $form_meta["id"] = $id;
         //creating default notification
         if (apply_filters('gform_default_notification', true)) {
             $default_notification = array("id" => uniqid(), "to" => "{admin_email}", "name" => __("Admin Notification", "gravityforms"), "event" => "form_submission", "toType" => "email", "subject" => __("New submission from", "gravityforms") . " {form_title}", "message" => "{all_fields}");
             $notifications = array($default_notification["id"] => $default_notification);
             //updating notifications form meta
             RGFormsModel::save_form_notifications($id, $notifications);
         }
         // add default confirmation when saving a new form
         $confirmation_id = uniqid();
         $confirmations = array();
         $confirmations[$confirmation_id] = array('id' => $confirmation_id, 'name' => __('Default Confirmation', 'gravityforms'), 'isDefault' => true, 'type' => 'message', 'message' => __("Thanks for contacting us! We will get in touch with you shortly.", "gravityforms"), 'url' => '', 'pageId' => '', 'queryString' => '');
         GFFormsModel::save_form_confirmations($id, $confirmations);
         //updating form meta
         RGFormsModel::update_form_meta($id, $form_meta);
         $form_meta = RGFormsModel::get_form_meta($id);
         do_action('gform_after_save_form', $form_meta, true);
         return array("status" => $id * -1, "meta" => $form_meta);
     }
 }
开发者ID:nickyshannon,项目名称:miriam,代码行数:60,代码来源:form_detail.php

示例7: save_form

 public static function save_form()
 {
     global $wpdb;
     check_ajax_referer('rg_save_form', 'rg_save_form');
     $id = $_POST["id"];
     $form_json = $_POST["form"];
     $form_json = stripslashes($form_json);
     //$form_json = preg_replace('|\r\n?|', '\n', $form_json);
     $form_json = nl2br($form_json);
     $form_meta = GFCommon::json_decode($form_json, true);
     if (!$form_meta) {
         die("EndUpdateForm(0);");
     }
     $form_table_name = $wpdb->prefix . "rg_form";
     $meta_table_name = $wpdb->prefix . "rg_form_meta";
     //Making sure title is not duplicate
     $forms = RGFormsModel::get_forms();
     foreach ($forms as $form) {
         if (strtolower($form->title) == strtolower($form_meta["title"]) && $form_meta["id"] != $form->id) {
             die('DuplicateTitleMessage();');
         }
     }
     if ($id > 0) {
         RGFormsModel::update_form_meta($id, $form_meta);
         //updating form title
         $wpdb->query($wpdb->prepare("UPDATE {$form_table_name} SET title=%s WHERE id=%d", $form_meta["title"], $form_meta["id"]));
         die("EndUpdateForm({$id});");
     } else {
         //inserting form
         $id = RGFormsModel::insert_form($form_meta["title"]);
         //updating object's id property
         $form_meta["id"] = $id;
         //creating default notification
         if (apply_filters('gform_default_notification', true)) {
             $form_meta["notification"]["to"] = get_bloginfo("admin_email");
             $form_meta["notification"]["subject"] = __("New submission from", "gravityforms") . " {form_title}";
             $form_meta["notification"]["message"] = "{all_fields}";
         }
         //updating form meta
         RGFormsModel::update_form_meta($id, $form_meta);
         die("EndInsertForm({$id});");
     }
 }
开发者ID:hypenotic,项目名称:slowfood,代码行数:43,代码来源:form_detail.php

示例8: import_file

 public static function import_file($filepath, &$forms = null)
 {
     $xmlstr = file_get_contents($filepath);
     require_once "xml.php";
     $options = array("page" => array("unserialize_as_array" => true), "form" => array("unserialize_as_array" => true), "field" => array("unserialize_as_array" => true), "rule" => array("unserialize_as_array" => true), "choice" => array("unserialize_as_array" => true), "input" => array("unserialize_as_array" => true), "routing_item" => array("unserialize_as_array" => true), "creditCard" => array("unserialize_as_array" => true), "routin" => array("unserialize_as_array" => true), "confirmation" => array("unserialize_as_array" => true), "notification" => array("unserialize_as_array" => true));
     $options = apply_filters('gform_import_form_xml_options', $options);
     $xml = new RGXML($options);
     $forms = $xml->unserialize($xmlstr);
     if (!$forms) {
         return 0;
     } else {
         if (version_compare($forms["version"], self::$min_import_version, "<")) {
             return -1;
         }
     }
     //Error. XML version is not compatible with current Gravity Forms version
     //cleaning up generated object
     self::cleanup($forms);
     foreach ($forms as $key => &$form) {
         $title = $form["title"];
         $count = 2;
         while (!RGFormsModel::is_unique_title($title)) {
             $title = $form["title"] . "({$count})";
             $count++;
         }
         //inserting form
         $form_id = RGFormsModel::insert_form($title);
         //updating form meta
         $form["title"] = $title;
         $form["id"] = $form_id;
         $form = GFFormsModel::trim_form_meta_values($form);
         if (isset($form['confirmations'])) {
             $form['confirmations'] = self::set_property_as_key($form['confirmations'], 'id');
             $form['confirmations'] = GFFormsModel::trim_conditional_logic_values($form['confirmations'], $form);
             GFFormsModel::update_form_meta($form_id, $form['confirmations'], 'confirmations');
             unset($form['confirmations']);
         }
         if (isset($form['notifications'])) {
             $form['notifications'] = self::set_property_as_key($form['notifications'], 'id');
             $form['notifications'] = GFFormsModel::trim_conditional_logic_values($form['notifications'], $form);
             GFFormsModel::update_form_meta($form_id, $form['notifications'], 'notifications');
             unset($form['notifications']);
         }
         RGFormsModel::update_form_meta($form_id, $form);
     }
     return sizeof($forms);
 }
开发者ID:maverickmediaco,项目名称:truenorthrealtorsny,代码行数:47,代码来源:export.php

示例9: save_form

 public static function save_form()
 {
     global $wpdb;
     check_ajax_referer('rg_save_form', 'rg_save_form');
     $id = $_POST["id"];
     $form_json = $_POST["form"];
     $form_json = stripslashes($form_json);
     $form_meta = GFCommon::json_decode($form_json, true);
     if (!$form_meta) {
         die("EndUpdateForm(0);");
     }
     $form_table_name = $wpdb->prefix . "rg_form";
     $meta_table_name = $wpdb->prefix . "rg_form_meta";
     //Making sure title is not duplicate
     $forms = RGFormsModel::get_forms();
     foreach ($forms as $form) {
         if (strtolower($form->title) == strtolower($form_meta["title"]) && $form_meta["id"] != $form->id) {
             die('DuplicateTitleMessage();');
         }
     }
     if ($id > 0) {
         RGFormsModel::update_form_meta($id, $form_meta);
         //updating form title
         $wpdb->query($wpdb->prepare("UPDATE {$form_table_name} SET title=%s WHERE id=%d", $form_meta["title"], $form_meta["id"]));
         die("EndUpdateForm({$id});");
     } else {
         //inserting form
         $id = RGFormsModel::insert_form($form_meta["title"]);
         //updating object's id property
         $form_meta["id"] = $id;
         //updating form meta
         RGFormsModel::update_form_meta($id, $form_meta);
         die("EndInsertForm({$id});");
     }
 }
开发者ID:812studio,项目名称:812studio,代码行数:35,代码来源:form_detail.php

示例10: generateForm

 public static function generateForm()
 {
     if (class_exists('GFAPI')) {
         $thankyouPage = get_page_by_path('events/thank-you', OBJECT, 'page');
         $form = array('labelPlacement' => 'top_label', 'useCurrentUserAsAuthor' => '1', 'title' => self::$formTitle, 'descriptionPlacement' => 'below', 'button' => array('type' => 'text', 'text' => 'Submit'), 'fields' => array(array('id' => '1', 'isRequired' => '1', 'size' => 'medium', 'type' => 'name', 'nameFormat' => 'simple', 'label' => 'First Name'), array('id' => '2', 'isRequired' => '1', 'size' => 'medium', 'type' => 'name', 'nameFormat' => 'simple', 'label' => 'Last Name'), array('id' => '3', 'isRequired' => '1', 'size' => 'medium', 'type' => 'email', 'label' => 'Email'), array('id' => '4', 'isRequired' => '1', 'size' => 'medium', 'type' => 'phone', 'phoneFormat' => 'standard', 'label' => 'Phone'), array('id' => '5', 'isRequired' => '1', 'size' => 'medium', 'type' => 'select', 'label' => 'Number Attending', 'choices' => array(array('text' => '1', 'value' => '1'), array('text' => '2', 'value' => '2'), array('text' => '3', 'value' => '3'), array('text' => '4', 'value' => '4'), array('text' => '5', 'value' => '5'), array('text' => '6', 'value' => '6'), array('text' => '7', 'value' => '7'), array('text' => '8', 'value' => '8'))), array('id' => '6', 'size' => 'medium', 'type' => 'hidden', 'defaultValue' => '{embed_post:post_title}', 'label' => 'Event Name'), array('id' => '7', 'size' => 'medium', 'type' => 'hidden', 'defaultValue' => '{embed_post:ID}', 'label' => 'Event Post ID'), array('id' => '8', 'size' => 'medium', 'type' => 'hidden', 'defaultValue' => '{custom_field:_EventStartDate}', 'label' => 'Event Start Date'), array('id' => '9', 'size' => 'medium', 'type' => 'hidden', 'defaultValue' => '{custom_field:_EventEndDate}', 'label' => 'Event End Date'), array('id' => '10', 'size' => 'medium', 'type' => 'hidden', 'defaultValue' => '{custom_field:_EventRecurrence}', 'label' => 'Event Recurrence'), array('id' => '11', 'size' => 'medium', 'type' => 'hidden', 'defaultValue' => '{custom_field:_EventAllDay}', 'label' => 'All Day Event'), array('id' => '90', 'size' => 'medium', 'type' => 'hidden', 'defaultValue' => '', 'label' => 'Event Formatted Date'), array('id' => '91', 'size' => 'medium', 'type' => 'hidden', 'defaultValue' => '', 'label' => 'Event Formatted Time')), 'cssClass' => 'contact-form-gfec-form', 'enableHoneypot' => '1', 'confirmations' => array(array('id' => '5316355c6c8c1', 'isDefault' => '1', 'type' => 'page', 'name' => 'Default Confirmation', 'pageId' => $thankyouPage->ID, 'queryString' => 'eventID={post_id:7}')), 'notifications' => array(array('id' => '53163750d13d3', 'to' => '3', 'name' => 'RSVP', 'event' => 'form_submission', 'toType' => 'field', 'subject' => 'Thank You for Registering for (Event Name:5} - {Event Date:6}', 'message' => '{all_fields}', 'from' => '{admin_email}', 'fromName' => get_bloginfo('name'))));
         if (RGFormsModel::is_unique_title($form['title'])) {
             $form_id = RGFormsModel::insert_form($form['title']);
             $form["id"] = $form_id;
             GFFormsModel::trim_form_meta_values($form);
             if (isset($form['confirmations'])) {
                 $form['confirmations'] = GFExport::set_property_as_key($form['confirmations'], 'id');
                 $form['confirmations'] = GFFormsModel::trim_conditional_logic_values($form['confirmations'], $form);
                 GFFormsModel::update_form_meta($form_id, $form['confirmations'], 'confirmations');
                 unset($form['confirmations']);
             }
             if (isset($form['notifications'])) {
                 $form['notifications'] = GFExport::set_property_as_key($form['notifications'], 'id');
                 $form['notifications'] = GFFormsModel::trim_conditional_logic_values($form['notifications'], $form);
                 GFFormsModel::update_form_meta($form_id, $form['notifications'], 'notifications');
                 unset($form['notifications']);
             }
             RGFormsModel::update_form_meta($form_id, $form);
         }
     }
 }
开发者ID:brooklyntri,项目名称:btc-plugins,代码行数:25,代码来源:ecgf.php


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