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


PHP RGForms::print_form_scripts方法代码示例

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


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

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

示例2: 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;
     }
     //setting tabindex based on configured value
     if (is_numeric($instance['tabindex'])) {
         add_filter("gform_tabindex_{$instance['form_id']}", create_function("", "return {$instance['tabindex']};"));
     }
     //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"]);
     //display form
     echo $form_markup;
     echo $after_widget;
 }
开发者ID:macconsultinggroup,项目名称:WordPress,代码行数:22,代码来源:widget.php

示例3: build_poll_ui

 public function build_poll_ui($form_id, $field_id = 0, $style = 'green', $mode = 'poll', $percentages = true, $counts = true, $title = true, $description = true, $confirmation = false, $show_results_link, $ajax = false, $cookie = '', $display_results = true, $field_values = '', $disable_scripts = false, $tabindex, $return = true)
 {
     $form = RGFormsModel::get_form_meta($form_id);
     if (empty($form)) {
         return;
     }
     $poll_fields = GFAPI::get_fields_by_type($form, array('poll'));
     if (empty($poll_fields)) {
         return;
     }
     $this->gpoll_add_scripts = true;
     if ($mode == 'results') {
         $results = $this->gpoll_get_results($form_id, $field_id, $style, $percentages, $counts);
         $output = $results['summary'];
     } else {
         $checksum = $this->generate_checksum($display_results, $show_results_link, $cookie, $confirmation, $percentages, $counts, $style);
         $show_results_link = false === $show_results_link ? 0 : 1;
         $field_values = htmlspecialchars_decode($field_values);
         $field_values = str_replace('&', '&', $field_values);
         $percentages = $percentages === false ? 0 : 1;
         $counts = $counts === false ? 0 : 1;
         $display_results = $display_results ? 1 : 0;
         if ($disable_scripts === false) {
             RGForms::print_form_scripts($form, $ajax);
         }
         if ($field_values != '') {
             $field_values .= '&';
         }
         $field_values .= "gpoll_enabled=1&gpoll_field={$field_id}&gpoll_style={$style}&gpoll_display_results={$display_results}&gpoll_show_results_link={$show_results_link}&gpoll_cookie={$cookie}&gpoll_confirmation={$confirmation}&gpoll_percentages={$percentages}&gpoll_counts={$counts}&gpoll_checksum={$checksum}";
         parse_str($field_values, $field_value_array);
         $field_value_array = stripslashes_deep($field_value_array);
         $output = RGForms::get_form($form_id, $title, $description, false, $field_value_array, $ajax, $tabindex);
     }
     if (false === $return) {
         echo $output;
     } else {
         return $output;
     }
 }
开发者ID:GravityPDF,项目名称:gravityformspolls,代码行数:39,代码来源:class-gf-polls.php


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