PluginProbe
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More / 6.27
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More v6.27
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 / styles / _quick-settings.php

_quick-settings.php in Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More 6.27, at classes/views/styles/_quick-settings.php

291 lines 8.5 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 <hr class="frm12"/>
7 <h2 class="frm12 frm-mb-0"><?php esc_html_e( 'Quick Settings', 'formidable' ); ?></h2>
8
9 <p class="frm12"><?php esc_html_e( 'Essential presets for a quick start. Explore advanced settings for more options', 'formidable' ); ?>.</p>
10
11 <div class="frm5 frm_form_field frm-mt-md">
12 <label
13 for="frm_style_qsettings_submit_bg_color"
14 class="frm-style-item-heading"><?php esc_html_e( 'Primary', 'formidable' ); ?></label>
15 </div>
16 <div class="frm7 frm_form_field frm-mt-md">
17 <?php
18 new FrmPrimaryColorStyleComponent(
19 null,
20 $style->post_content['submit_bg_color'],
21 array(
22 'id' => 'frm_style_qsettings_submit_bg_color',
23 'frm_style' => $frm_style,
24 'style' => $style,
25 'action_slug' => 'submit_bg_color',
26 'will_change' => array(
27 $frm_style->get_field_name( 'submit_bg_color' ),
28 $frm_style->get_field_name( 'slider_color' ),
29 $frm_style->get_field_name( 'border_color_active' ),
30 $frm_style->get_field_name( 'submit_border_color' ),
31 $frm_style->get_field_name( 'progress_active_bg_color' ),
32 $frm_style->get_field_name( 'date_band_color' ),
33 $frm_style->get_field_name( 'date_head_bg_color' ),
34 $frm_style->get_field_name( 'toggle_on_color' ),
35 $frm_style->get_field_name( 'submit_active_border_color' ),
36 $frm_style->get_field_name( 'submit_active_bg_color' ),
37 $frm_style->get_field_name( 'submit_hover_bg_color' ),
38 $frm_style->get_field_name( 'submit_hover_border_color' ),
39 $frm_style->get_field_name( 'toggle_on_color' ),
40
41 ),
42 )
43 );
44 ?>
45 </div>
46
47 <div class="frm5 frm_form_field">
48 <label
49 for="frm_style_qsettings_text_color"
50 class="frm-style-item-heading"><?php esc_html_e( 'Field Text', 'formidable' ); ?></label>
51 </div>
52 <div class="frm7 frm_form_field">
53 <?php
54 new FrmPrimaryColorStyleComponent(
55 null,
56 $style->post_content['text_color'],
57 array(
58 'id' => 'frm_style_qsettings_text_color',
59 'frm_style' => $frm_style,
60 'style' => $style,
61 'action_slug' => 'text_color',
62 'will_change' => array(
63 $frm_style->get_field_name( 'text_color' ),
64 $frm_style->get_field_name( 'section_color' ),
65 $frm_style->get_field_name( 'check_label_color' ),
66 ),
67 )
68 );
69 ?>
70 </div>
71
72 <div class="frm5 frm_form_field">
73 <label
74 for="frm_style_qsettings_border_color"
75 class="frm-style-item-heading"><?php esc_html_e( 'Field Border', 'formidable' ); ?></label>
76 </div>
77 <div class="frm7 frm_form_field">
78 <?php
79 new FrmPrimaryColorStyleComponent(
80 null,
81 $style->post_content['border_color'],
82 array(
83 'id' => 'frm_style_qsettings_border_color',
84 'frm_style' => $frm_style,
85 'style' => $style,
86 'action_slug' => 'border_color',
87 'will_change' => array(
88 $frm_style->get_field_name( 'border_color' ),
89 ),
90 )
91 );
92 ?>
93 </div>
94
95 <div class="frm5 frm_form_field">
96 <label
97 for="frm_style_qsettings_submit_text_color"
98 class="frm-style-item-heading"><?php esc_html_e( 'Button Text', 'formidable' ); ?></label>
99 </div>
100 <div class="frm7 frm_form_field">
101 <?php
102 new FrmPrimaryColorStyleComponent(
103 null,
104 $style->post_content['submit_text_color'],
105 array(
106 'id' => 'frm_style_qsettings_submit_text_color',
107 'frm_style' => $frm_style,
108 'style' => $style,
109 'action_slug' => 'submit_text_color',
110 'will_change' => array(
111 $frm_style->get_field_name( 'submit_text_color' ),
112 ),
113 )
114 );
115 ?>
116 </div>
117
118 <hr class="frm12"/>
119
120 <div class="frm5 frm_form_field">
121 <label
122 for="frm_field_margin"
123 class="frm-style-item-heading"><?php esc_html_e( 'Vertical Spacing', 'formidable' ); ?></label>
124 </div>
125 <div class="frm7 frm_form_field">
126 <?php
127 new FrmSliderStyleComponent(
128 null,
129 $style->post_content['field_margin'],
130 array(
131 'id' => 'frm_field_margin',
132 'max_value' => 100,
133 'will_change' => array(
134 $frm_style->get_field_name( 'field_margin' ),
135 ),
136 )
137 );
138 ?>
139 </div>
140
141 <div class="frm5 frm_form_field">
142 <label
143 for="frm_field_pad"
144 class="frm-style-item-heading"><?php esc_html_e( 'Input Field Padding', 'formidable' ); ?></label>
145 </div>
146 <div class="frm7 frm_form_field">
147 <?php
148 new FrmSliderStyleComponent(
149 null,
150 $style->post_content['field_pad'],
151 array(
152 'id' => 'frm_field_pad',
153 'max_value' => 100,
154 'will_change' => array(
155 $frm_style->get_field_name( 'field_pad' ),
156 ),
157 )
158 );
159 ?>
160 </div>
161 <hr class="frm12"/>
162 <div class="frm5 frm_form_field">
163 <label
164 for="frm_base_font_size"
165 class="frm-style-item-heading"><?php esc_html_e( 'Base Font Size', 'formidable' ); ?></label>
166 </div>
167 <div class="frm7 frm_form_field">
168 <?php
169 if ( ! FrmStylesHelper::is_advanced_settings() ) {
170 // This is displayed only in "Quick Settings" and has a default value of "false." It is updated via JavaScript when the Base Font Size slider is adjusted.
171 // When set to false, the sizes in "Advanced Settings" will not be modified.
172 ?>
173 <input type="hidden" name="<?php echo esc_attr( $frm_style->get_field_name( 'use_base_font_size' ) ); ?>" value="false" />
174 <?php } ?>
175 <?php
176 new FrmSliderStyleComponent(
177 $frm_style->get_field_name( 'base_font_size' ),
178 $style->post_content['base_font_size'],
179 array(
180 'id' => 'frm_base_font_size',
181 'max_value' => 100,
182 'not_show_in' => 'advanced-settings',
183 'classname' => 'frm-base-font-size',
184 )
185 );
186 ?>
187 </div>
188
189 <hr class="frm12"/>
190
191 <div class="frm5 frm_form_field">
192 <label
193 for="frm_field_shape"
194 class="frm-style-item-heading"><?php esc_html_e( 'Field Shape', 'formidable' ); ?></label>
195 </div>
196 <div class="frm7 frm_form_field frm-sm-z-index">
197 <?php
198 new FrmFieldShapeStyleComponent(
199 $frm_style->get_field_name( 'field_shape_type' ),
200 $style->post_content['field_shape_type'],
201 array(
202 'id' => 'frm_field_shape',
203 )
204 );
205 ?>
206 </div>
207
208 <div class="frm5 frm_form_field frm_hidden" data-frm-element="field-shape-corner-radius">
209 <label
210 for="frm_border_radius"
211 class="frm-style-item-heading"><?php esc_html_e( 'Corner Radius', 'formidable' ); ?></label>
212 </div>
213 <div class="frm7 frm_form_field frm_hidden frm-md-z-index" data-frm-element="field-shape-corner-radius">
214 <?php
215 new FrmSliderStyleComponent(
216 null,
217 $style->post_content['border_radius'],
218 array(
219 'id' => 'frm_border_radius',
220 'max_value' => 50,
221 'will_change' => array(
222 $frm_style->get_field_name( 'border_radius' ),
223 ),
224 )
225 );
226 ?>
227 </div>
228
229 <div class="frm5 frm_form_field">
230 <label
231 for="frm_enable_single_style_custom_css"
232 class="frm-style-item-heading">
233 <?php esc_html_e( 'Custom CSS', 'formidable' ); ?>
234 </label>
235 </div>
236 <div class="frm7 frm_form_field frm-style-component">
237 <?php
238 FrmHtmlHelper::toggle(
239 'frm_enable_single_style_custom_css',
240 $frm_style->get_field_name( 'enable_style_custom_css' ),
241 array(
242 'div_class' => 'with_frm_style frm_toggle',
243 'checked' => ! empty( $style->post_content['enable_style_custom_css'] ),
244 'echo' => true,
245 'aria-label-attr' => __( 'Custom CSS', 'formidable' ),
246 )
247 );
248 ?>
249 </div>
250
251 <div id="frm_single_style_custom_css_editor" class="frm12 frm_form_field frm-style-component <?php echo empty( $style->post_content['enable_style_custom_css'] ) ? 'frm_hidden' : ''; ?>">
252 <?php
253 $css_scope_helper = new FrmCssScopeHelper();
254 $custom_css = $style->post_content['single_style_custom_css'] ?? '';
255
256 if ( ! empty( $custom_css ) ) {
257 $custom_css = $css_scope_helper->unnest( $custom_css, 'frm_style_' . $style->post_name );
258 }
259
260 FrmStylesController::custom_css(
261 '',
262 array(
263 'heading' => '',
264 'id' => 'frm_single_style_custom_css',
265 'textarea_params' => array(
266 'name' => $frm_style->get_field_name( 'single_style_custom_css' ),
267 'id' => 'frm_single_style_custom_css',
268 ),
269 'custom_css' => $custom_css,
270 'placeholder' => __( '/* Enter your custom CSS here */', 'formidable' ),
271 'show_errors' => false,
272 )
273 );
274 ?>
275 </div>
276 <div class="frm3 frm_form_field">
277 <label
278 for="frm_style_class"
279 class="frm-style-item-heading"><?php esc_html_e( 'Style Class', 'formidable' ); ?></label>
280 </div>
281 <div class="frm9 frm_form_field frm-style-component" id="frm_style_class_custom_css" data-css-scope="<?php echo esc_attr( 'frm_style_' . $style->post_name ); ?>">
282 <label class="frm-copy-text">.frm_style_<?php
283 echo esc_html( $style->post_name );
284 FrmAppHelper::icon_by_class( 'frmfont frm-copy-icon' );
285 ?>
286 </label>
287 </div>
288
289 <hr class="frm12"/>
290
291 <a id="frm-style-advanced-settings-button" class="frm-button-secondary frm-mt-md frmcenter" href="#"><?php esc_html_e( 'Show advanced settings', 'formidable' ); ?></a>