PluginProbe
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More / 5.0
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More v5.0
6.35 6.34 6.33.1 6.33 6.32.1 6.32 6.31 6.25 6.25.1 6.26 6.26.1 6.27 6.28 6.29 6.3 6.3.1 6.3.2 6.30 6.4 6.4.1 6.4.2 6.5 6.5.1 6.5.2 6.5.3 All 141 releases
formidable / classes / views / shared / mb_adv_info.php

mb_adv_info.php in Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More 5.0, at classes/views/shared/mb_adv_info.php

260 lines 6.9 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 if ( ! defined( 'ABSPATH' ) ) {
3 die( 'You are not allowed to call this page directly.' );
4 }
5 ?>
6 <div id="taxonomy-linkcategory" class="categorydiv <?php echo esc_attr( $class ); ?>">
7 <ul id="frm-nav-tabs" class="frm-nav-tabs <?php echo esc_attr( $settings_tab ? '' : 'frm-compact-nav' ); ?>">
8 <li class="frm-tabs">
9 <a href="#frm-insert-fields-box" id="frm_insert_fields_tab">
10 <?php esc_html_e( 'Fields', 'formidable' ); ?>
11 </a>
12 </li>
13 <?php if ( ! empty( $cond_shortcodes ) ) { ?>
14 <li class="hide-if-no-js">
15 <a href="#frm-conditionals">
16 <?php esc_html_e( 'Conditionals', 'formidable' ); ?>
17 </a>
18 </li>
19 <?php } ?>
20 <li class="hide-if-no-js">
21 <a href="#frm-adv-info-tab">
22 <?php esc_html_e( 'Advanced', 'formidable' ); ?>
23 </a>
24 </li>
25 <?php if ( $settings_tab ) { ?>
26 <li id="frm_html_tab" class="hide-if-no-js frm_hidden">
27 <a href="#frm-html-tags" id="frm_html_tags_tab">
28 <?php esc_html_e( 'HTML Tags', 'formidable' ); ?>
29 </a>
30 </li>
31 <?php } ?>
32 </ul>
33
34 <div id="frm-insert-fields-box" class="tabs-panel">
35 <?php
36 if ( count( $fields ) > 8 ) {
37 FrmAppHelper::show_search_box(
38 array(
39 'input_id' => 'field',
40 'placeholder' => __( 'Search', 'formidable' ),
41 'tosearch' => 'frm-customize-list',
42 )
43 );
44 }
45 ?>
46
47 <ul class="subsubsub">
48 <li><a href="javascript:void(0)" class="current frmids"><?php esc_html_e( 'IDs', 'formidable' ); ?></a> |</li>
49 <li><a href="javascript:void(0)" class="frmkeys"><?php esc_html_e( 'Keys', 'formidable' ); ?></a></li>
50 </ul>
51 <ul class="frm_code_list frm_customize_field_list frm-full-hover">
52 <?php
53 if ( ! empty( $fields ) ) {
54 foreach ( $fields as $f ) {
55 if ( FrmField::is_no_save_field( $f->type ) ) {
56 continue;
57 }
58
59 if ( $f->type == 'data' && ( ! isset( $f->field_options['data_type'] ) || $f->field_options['data_type'] == 'data' || $f->field_options['data_type'] == '' ) ) {
60 continue;
61 }
62
63 FrmFormsHelper::insert_opt_html(
64 array(
65 'id' => $f->id,
66 'key' => $f->field_key,
67 'name' => $f->name,
68 'type' => $f->type,
69 'class' => 'frm-customize-list',
70 )
71 );
72
73 do_action( 'frm_field_code_tab', array( 'field' => $f ) );
74
75 if ( $f->type == 'user_id' ) {
76 $uid = $f->id;
77 }
78 unset( $f );
79 }
80 }
81 ?>
82 </ul>
83 </div>
84
85 <?php
86 $show_logic = ! empty( $cond_shortcodes ) && ! empty( $fields );
87 if ( $show_logic ) {
88 ?>
89 <div id="frm-conditionals" class="tabs-panel">
90 <div class="frmcenter">
91 <label class="frm_toggle frm_toggle_long">
92 <input type="checkbox" value="id" checked="checked" id="frm-id-key-condition" />
93 <span class="frm_toggle_slider"></span>
94 <span class="frm_toggle_on">
95 <?php esc_html_e( 'ID', 'formidable' ); ?>
96 </span>
97 <span class="frm_toggle_off">
98 <?php esc_html_e( 'Key', 'formidable' ); ?>
99 </span>
100 </label>
101 </div>
102
103 <div class="frm_grid_container frm-fields">
104 <div class="frm1 frm_form_field" style="line-height:27px;">
105 <label for="frm-id-condition">
106 <?php esc_html_e( 'IF', 'formidable' ); ?>
107 </label>
108 </div>
109
110 <div class="frm11 frm_form_field">
111 <select id="frm-id-condition" class="frm-build-logic">
112 <option value="x">
113 <?php esc_html_e( 'Select a Field', 'formidable' ); ?>
114 </option>
115 <?php
116 foreach ( $fields as $f ) {
117 ?>
118 <option value="<?php echo esc_attr( $f->id ); ?>">
119 <?php echo esc_html( $f->name ); ?>
120 </option>
121 <?php
122 }
123 ?>
124 </select>
125 <select id="frm-key-condition" class="frm_hidden frm-build-logic">
126 <option value="x">
127 <?php esc_html_e( 'Select a Field', 'formidable' ); ?>
128 </option>
129 <?php
130 foreach ( $fields as $f ) {
131 ?>
132 <option value="<?php echo esc_attr( $f->field_key ); ?>">
133 <?php echo esc_html( $f->name ); ?>
134 </option>
135 <?php
136 }
137 ?>
138 </select>
139 </div>
140
141 <div class="frm1 frm_form_field"></div>
142 <div class="frm11 frm_form_field">
143 <select id="frm-is-condition" class="frm-build-logic">
144 <?php
145 foreach ( $cond_shortcodes as $skey => $sname ) {
146 ?>
147 <option value="<?php echo esc_attr( $skey ); ?>">
148 <?php echo esc_html( $sname ); ?>
149 </option>
150 <?php
151 unset( $skey, $sname );
152 }
153 ?>
154 </select>
155 </div>
156
157 <div class="frm1 frm_form_field"></div>
158 <div class="frm11 frm_form_field">
159 <input id="frm-text-condition" type="text" value="" placeholder="<?php esc_attr_e( 'A blank value', 'formidable' ); ?>" class="frm-build-logic" />
160 </div>
161 <h3 class="frm-with-line">
162 <span><?php esc_html_e( 'Click to Insert', 'formidable' ); ?></span>
163 </h3>
164 <ul class="frm_code_list frm-full-hover frmcenter">
165 <li>
166 <a href="#" id="frm-insert-condition" class="frm_insert_code" data-code="if x equals='']<?php esc_attr_e( 'Conditional content here', 'formidable' ); ?>[/if x">
167 [if x equals=""][/if x]
168 </a>
169 </li>
170 </ul>
171 <br/>
172 </div>
173 </div>
174 <?php
175 }
176 ?>
177
178 <div id="frm-adv-info-tab" class="tabs-panel">
179 <?php
180 FrmAppHelper::show_search_box(
181 array(
182 'input_id' => 'advanced',
183 'placeholder' => __( 'Search', 'formidable' ),
184 'tosearch' => 'frm-advanced-list',
185 )
186 );
187 ?>
188 <ul class="frm_code_list frm-full-hover">
189 <?php
190 foreach ( $entry_shortcodes as $skey => $sname ) {
191 if ( empty( $skey ) ) {
192 echo '<li class="clear frm_block"></li>';
193 continue;
194 }
195
196 $classes = 'frm-advanced-list';
197 $classes .= ( in_array( $skey, array( 'siteurl', 'sitename', 'entry_count' ) ) ) ? ' show_before_content show_after_content' : '';
198 $classes .= ( strpos( $skey, 'default-' ) === 0 ) ? ' hide_frm_not_email_subject' : '';
199
200 FrmFormsHelper::insert_code_html(
201 array(
202 'code' => $skey,
203 'label' => $sname,
204 'class' => $classes,
205 )
206 );
207
208 unset( $skey, $sname, $classes );
209 }
210
211 foreach ( $advanced_helpers as $helper_type => $helper ) {
212 if ( 'user_id' === $helper_type && ! isset( $uid ) ) {
213 continue;
214 }
215
216 if ( isset( $helper['heading'] ) && ! empty( $helper['heading'] ) ) {
217 ?>
218 <li style="padding:0 25px;">
219 <p class="howto"><?php echo esc_html( $helper['heading'] ); ?></p>
220 </li>
221 <?php
222 }
223
224 foreach ( $helper['codes'] as $code => $code_label ) {
225 if ( isset( $uid ) ) {
226 $code = str_replace( '|user_id|', $uid, $code );
227 } else {
228 $code = str_replace( '|user_id|', 'x', $code );
229 }
230 $include_x = strpos( $code, ' ' ) ? '' : 'x ';
231
232 if ( ! is_array( $code_label ) ) {
233 $code_label = array(
234 'label' => $code_label,
235 );
236 }
237
238 FrmFormsHelper::insert_code_html(
239 array(
240 'code' => $include_x . $code,
241 'label' => $code_label['label'],
242 'title' => isset( $code_label['title'] ) ? $code_label['title'] : '',
243 'class' => 'frm-advanced-list',
244 )
245 );
246
247 unset( $code );
248 }
249 }
250 ?>
251 </ul>
252 </div>
253
254 <?php
255 if ( $settings_tab ) {
256 include( FrmAppHelper::plugin_path() . '/classes/views/frm-forms/mb_html_tab.php' );
257 }
258 ?>
259 </div>
260