PluginProbe
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More / 6.23
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More v6.23
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 6.23, at classes/views/shared/mb_adv_info.php

278 lines 7.1 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 echo '<div class="dropdown-item frm-with-search">';
38 FrmAppHelper::show_search_box(
39 array(
40 'input_id' => 'field',
41 'placeholder' => __( 'Search', 'formidable' ),
42 'tosearch' => 'frm-customize-list',
43 )
44 );
45 echo '</div>';
46 }
47 ?>
48
49 <ul class="subsubsub">
50 <li><a href="javascript:void(0)" class="current frmids"><?php esc_html_e( 'IDs', 'formidable' ); ?></a> |</li>
51 <li><a href="javascript:void(0)" class="frmkeys"><?php esc_html_e( 'Keys', 'formidable' ); ?></a></li>
52 </ul>
53 <ul class="frm_code_list frm_customize_field_list frm-full-hover">
54 <?php
55 if ( ! empty( $fields ) ) {
56 foreach ( $fields as $f ) {
57 if ( FrmField::is_no_save_field( $f->type ) ) {
58 continue;
59 }
60
61 if ( $f->type === 'data' && ( ! isset( $f->field_options['data_type'] ) || $f->field_options['data_type'] === 'data' || $f->field_options['data_type'] == '' ) ) {
62 continue;
63 }
64
65 FrmFormsHelper::insert_opt_html(
66 array(
67 'id' => $f->id,
68 'key' => $f->field_key,
69 'name' => $f->name,
70 'type' => $f->type,
71 'class' => 'frm-customize-list dropdown-item',
72 )
73 );
74
75 do_action( 'frm_field_code_tab', array( 'field' => $f ) );
76
77 if ( $f->type === 'user_id' ) {
78 $uid = $f->id;
79 }
80 unset( $f );
81 }//end foreach
82 }//end if
83 ?>
84 </ul>
85 </div>
86
87 <?php
88 $show_logic = ! empty( $cond_shortcodes ) && ! empty( $fields );
89 if ( $show_logic ) {
90 ?>
91 <div id="frm-conditionals" class="tabs-panel">
92 <div class="frmcenter">
93 <?php
94 FrmHtmlHelper::toggle(
95 'frm-id-key-condition',
96 '',
97 array(
98 'checked' => true,
99 'on_label' => __( 'Use IDs', 'formidable' ),
100 'off_label' => __( 'Use Keys', 'formidable' ),
101 'value' => 'id',
102 'show_labels' => true,
103 'echo' => true,
104 )
105 );
106 ?>
107 </div>
108
109 <div class="frm_grid_container frm-fields frm-mx-sm">
110 <div class="frm1 frm_form_field frm-inline-select">
111 <label for="frm-id-condition">
112 <?php esc_html_e( 'IF', 'formidable' ); ?>
113 </label>
114 </div>
115
116 <div class="frm11 frm_form_field">
117 <select id="frm-id-condition" class="frm-build-logic">
118 <option value="x">
119 <?php esc_html_e( 'Select a Field', 'formidable' ); ?>
120 </option>
121 <?php
122 foreach ( $fields as $f ) {
123 FrmHtmlHelper::echo_dropdown_option(
124 $f->name,
125 false,
126 array(
127 'value' => $f->id,
128 )
129 );
130 }
131 ?>
132 </select>
133 <select id="frm-key-condition" class="frm_hidden frm-build-logic">
134 <option value="x">
135 <?php esc_html_e( 'Select a Field', 'formidable' ); ?>
136 </option>
137 <?php
138 foreach ( $fields as $f ) {
139 FrmHtmlHelper::echo_dropdown_option(
140 $f->name,
141 false,
142 array(
143 'value' => $f->field_key,
144 )
145 );
146 }
147 ?>
148 </select>
149 </div>
150
151 <div class="frm1 frm_form_field"></div>
152 <div class="frm11 frm_form_field">
153 <select id="frm-is-condition" class="frm-build-logic">
154 <?php
155 foreach ( $cond_shortcodes as $skey => $sname ) {
156 FrmHtmlHelper::echo_dropdown_option(
157 $sname,
158 false,
159 array(
160 'value' => $skey,
161 )
162 );
163 unset( $skey, $sname );
164 }
165 ?>
166 </select>
167 </div>
168
169 <div class="frm1 frm_form_field"></div>
170 <div class="frm11 frm_form_field">
171 <input id="frm-text-condition" type="text" value="" placeholder="<?php esc_attr_e( 'A blank value', 'formidable' ); ?>" class="frm-build-logic" />
172 </div>
173 </div>
174 <p class="frmcenter frm-mb-0">
175 <?php esc_html_e( 'Click to Insert', 'formidable' ); ?>:
176 </p>
177 <ul class="frm_code_list frm-full-hover frmcenter frm-m-0">
178 <li>
179 <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">
180 [if x equals=""][/if x]
181 </a>
182 </li>
183 </ul>
184 </div>
185 <?php
186 }//end if
187 ?>
188
189 <div id="frm-adv-info-tab" class="tabs-panel">
190 <div class="dropdown-item frm-with-search">
191 <?php
192 FrmAppHelper::show_search_box(
193 array(
194 'input_id' => 'advanced',
195 'placeholder' => __( 'Search', 'formidable' ),
196 'tosearch' => 'frm-advanced-list',
197 )
198 );
199 ?>
200 </div>
201 <ul class="frm_code_list frm-full-hover">
202 <?php
203 $contextual_codes = FrmShortcodeHelper::get_contextual_codes();
204 foreach ( $entry_shortcodes as $skey => $sname ) {
205 if ( ! $skey ) {
206 echo '<li class="clear frm_block"></li>';
207 continue;
208 }
209
210 $classes = 'frm-advanced-list';
211 $classes .= in_array( $skey, array( 'siteurl', 'sitename', 'entry_count' ), true ) ? ' show_before_content show_after_content' : '';
212 $classes .= strpos( $skey, 'default-' ) === 0 ? ' hide_frm_not_email_subject' : '';
213
214 if ( in_array( $skey, array_keys( $contextual_codes ), true ) ) {
215 $classes .= ' frm_hidden';
216 }
217
218 FrmFormsHelper::insert_code_html(
219 array(
220 'code' => $skey,
221 'label' => $sname,
222 'class' => $classes,
223 )
224 );
225
226 unset( $skey, $sname, $classes );
227 }//end foreach
228
229 foreach ( $advanced_helpers as $helper_type => $helper ) {
230 if ( 'user_id' === $helper_type && ! isset( $uid ) ) {
231 continue;
232 }
233
234 if ( ! empty( $helper['heading'] ) ) {
235 ?>
236 <li style="padding:0 25px;">
237 <p class="howto"><?php echo esc_html( $helper['heading'] ); ?></p>
238 </li>
239 <?php
240 }
241
242 foreach ( $helper['codes'] as $code => $code_label ) {
243 if ( isset( $uid ) ) {
244 $code = str_replace( '|user_id|', $uid, $code );
245 } else {
246 $code = str_replace( '|user_id|', 'x', $code );
247 }
248 $include_x = strpos( $code, ' ' ) ? '' : 'x ';
249
250 if ( ! is_array( $code_label ) ) {
251 $code_label = array(
252 'label' => $code_label,
253 );
254 }
255
256 FrmFormsHelper::insert_code_html(
257 array(
258 'code' => $include_x . $code,
259 'label' => $code_label['label'],
260 'title' => isset( $code_label['title'] ) ? $code_label['title'] : '',
261 'class' => 'frm-advanced-list',
262 )
263 );
264
265 unset( $code );
266 }//end foreach
267 }//end foreach
268 ?>
269 </ul>
270 </div>
271
272 <?php
273 if ( $settings_tab ) {
274 include FrmAppHelper::plugin_path() . '/classes/views/frm-forms/mb_html_tab.php';
275 }
276 ?>
277 </div>
278