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

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