PluginProbe
Fluent Forms – Customizable Contact Forms, Survey, Quiz, & Conversational Form Builder / 6.2.14
Fluent Forms – Customizable Contact Forms, Survey, Quiz, & Conversational Form Builder v6.2.14
6.2.14 6.2.13 6.2.12 6.2.10 6.2.11 6.2.9 6.2.8 6.2.7 6.2.6 6.2.5 6.2.4 6.2.3 6.2.2 3.6.22 3.6.31 3.6.40 3.6.41 3.6.42 3.6.50 3.6.51 3.6.60 3.6.61 3.6.62 3.6.64 3.6.65 All 196 releases
← All changes | app/Modules/Widgets/FluentFormWidget.php +783 -637 3.6.516.2.14 View file →
@@ -1,5 +1,6 @@
1 1 <?php
2 +
2 3 namespace FluentForm\App\Modules\Widgets;
3 4
4 5 use Elementor\Widget_Base;
5 6 use Elementor\Controls_Manager;
@@ -5,29 +6,36 @@
5 6 use Elementor\Controls_Manager;
6 7 use Elementor\Group_Control_Border;
7 8 use Elementor\Group_Control_Box_Shadow;
8 9 use Elementor\Group_Control_Typography;
9 -use \Elementor\Scheme_Typography as Scheme_Typography;
10 10 use Elementor\Group_Control_Background;
11 -use \Elementor\Scheme_Color;
11 +use FluentForm\App\Helpers\Helper;
12 +use Elementor\Core\Kits\Documents\Tabs\Global_Typography;
13 +use Elementor\Core\Kits\Documents\Tabs\Global_Colors;
12 14
13 -if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
15 +if (!defined('ABSPATH')) {
16 + exit;
17 +} // Exit if accessed directly
14 18
15 -class FluentFormWidget extends Widget_Base {
16 -
17 - public function get_name() {
19 +class FluentFormWidget extends Widget_Base
20 +{
21 + public function get_name()
22 + {
18 23 return 'fluent-form-widget';
19 24 }
20 25
21 - public function get_title() {
22 - return __( 'Fluent Form', 'fluentform' );
26 + public function get_title()
27 + {
28 + return __('Fluent Forms', 'fluentform');
23 29 }
24 30
25 - public function get_icon() {
31 + public function get_icon()
32 + {
26 33 return 'eicon-form-horizontal';
27 34 }
28 35
29 - public function get_keywords() {
36 + public function get_keywords()
37 + {
30 38 return [
31 39 'fluentform',
32 40 'fluentforms',
33 41 'fluent form',
@@ -37,60 +45,92 @@
37 45 'elementor form',
38 46 ];
39 47 }
40 48
41 - public function get_categories() {
42 - return array('general');
49 + public function get_categories()
50 + {
51 + return ['general'];
43 52 }
44 53
45 - public function get_style_depends() {
54 + public function get_style_depends()
55 + {
46 56 return [
47 57 'fluent-form-styles',
48 - 'fluentform-public-default'
58 + 'fluentform-public-default',
49 59 ];
50 60 }
51 61
52 - public function get_script_depends() {
53 - return [ 'fluentform-elementor'];
62 + public function get_script_depends()
63 + {
64 + return ['fluentform-elementor'];
54 65 }
55 66
56 - protected function _register_controls()
67 + protected function register_controls()
57 68 {
58 - $this->register_general_controls();
59 - $this->register_error_controls();
60 - $this->register_title_description_style_controls();
61 - $this->register_form_container_style_controls();
62 - $this->register_label_style_controls();
63 - $this->register_input_textarea_style_controls();
64 - $this->register_placeholder_style_controls();
65 - $this->register_radio_checkbox_style_controls();
66 - $this->register_section_break_style_controls();
67 - $this->register_checkbox_grid_style_controls();
68 - $this->register_address_line_style_controls();
69 - $this->register_image_upload_style_controls();
70 - $this->register_pagination_style_controls();
71 - $this->register_submit_button_style_controls();
72 - $this->register_success_message_style_controls();
73 - $this->register_errors_style_controls();
69 + $this->register_general_controls();
70 + $this->register_error_controls();
71 + $this->register_title_description_style_controls();
72 + $this->register_form_container_style_controls();
73 + $this->register_label_style_controls();
74 + $this->register_input_textarea_style_controls();
75 + $this->register_placeholder_style_controls();
76 + $this->register_radio_checkbox_style_controls();
77 + $this->register_terms_gdpr_style_controls();
78 + $this->register_section_break_style_controls();
79 + $this->register_checkbox_grid_style_controls();
80 + $this->register_address_line_style_controls();
81 + $this->register_image_upload_style_controls();
82 + $this->register_pagination_style_controls();
83 + $this->register_submit_button_style_controls();
84 + $this->register_success_message_style_controls();
85 + $this->register_errors_style_controls();
74 86 }
75 87
76 - protected function register_general_controls(){
88 + protected function register_general_controls()
89 + {
77 90 $this->start_controls_section(
78 91 'section_fluent_form',
79 92 [
80 - 'label' => __('Fluent Form', 'fluentform'),
93 + 'label' => __('Fluent Forms', 'fluentform'),
81 94 ]
82 95 );
83 96
97 + $this->add_control(
98 + 'form_list',
99 + [
100 + 'label' => esc_html__('Fluent Forms', 'fluentform'),
101 + 'type' => Controls_Manager::SELECT2,
102 + 'label_block' => true,
103 + 'multiple' => false,
104 + 'options' => Helper::getForms(),
105 + 'default' => '0',
106 + ]
107 + );
84 108
85 109 $this->add_control(
86 - 'form_list',
110 + 'form_edit_button',
87 111 [
88 - 'label' => esc_html__('Fluent Form', 'fluentform'),
89 - 'type' => Controls_Manager::SELECT,
112 + 'type' => Controls_Manager::RAW_HTML,
113 + 'raw' => '<a href="#" class="fluentform-edit-link" style="display: block; text-align: center; padding: 10px; margin-top: 10px; background-color: #6EC1E4; color: #fff; border-radius: 3px; text-decoration: none; cursor: pointer;" target="_blank" rel="noopener" data-form-id="">' . esc_html__('Edit Form', 'fluentform') . '</a>',
114 + 'content_classes' => 'fluentform-edit-button-wrapper',
115 + 'condition' => [
116 + 'form_list!' => '0',
117 + ],
118 + ]
119 + );
120 +
121 + $this->add_control(
122 + 'theme_style',
123 + [
124 + 'label' => __('Form Style Template', 'fluentform'),
125 + 'type' => Controls_Manager::SELECT2,
90 126 'label_block' => true,
91 - 'options' => ElementorWidget::getForms(),
92 - 'default' => '0',
127 + 'multiple' => false,
128 + 'options' => $this->getStylePresets(),
129 + 'default' => '',
130 + 'condition' => [
131 + 'form_list!' => '0',
132 + ],
93 133 ]
94 134 );
95 135
96 136 $this->add_control(
@@ -95,12 +135,12 @@
95 135
96 136 $this->add_control(
97 137 'custom_title_description',
98 138 [
99 - 'label' => __('Custom Title & Description', 'fluentform'),
100 - 'type' => Controls_Manager::SWITCHER,
101 - 'label_on' => __('Yes', 'fluentform'),
102 - 'label_off' => __('No', 'fluentform'),
139 + 'label' => __('Custom Title & Description', 'fluentform'),
140 + 'type' => Controls_Manager::SWITCHER,
141 + 'label_on' => __('Yes', 'fluentform'),
142 + 'label_off' => __('No', 'fluentform'),
103 143 'return_value' => 'yes',
104 144 ]
105 145 );
106 146
@@ -106,13 +146,13 @@
106 146
107 147 $this->add_control(
108 148 'form_title_custom',
109 149 [
110 - 'label' => esc_html__('Title', 'fluentform'),
111 - 'type' => Controls_Manager::TEXT,
150 + 'label' => esc_html__('Title', 'fluentform'),
151 + 'type' => Controls_Manager::TEXT,
112 152 'label_block' => true,
113 - 'default' => '',
114 - 'condition' => [
153 + 'default' => '',
154 + 'condition' => [
115 155 'custom_title_description' => 'yes',
116 156 ],
117 157 ]
118 158 );
@@ -119,11 +159,11 @@
119 159
120 160 $this->add_control(
121 161 'form_description_custom',
122 162 [
123 - 'label' => esc_html__('Description', 'fluentform'),
124 - 'type' => Controls_Manager::TEXTAREA,
125 - 'default' => '',
163 + 'label' => esc_html__('Description', 'fluentform'),
164 + 'type' => Controls_Manager::TEXTAREA,
165 + 'default' => '',
126 166 'condition' => [
127 167 'custom_title_description' => 'yes',
128 168 ],
129 169 ]
@@ -131,14 +171,14 @@
131 171
132 172 $this->add_control(
133 173 'labels_switch',
134 174 [
135 - 'label' => __('Labels', 'fluentform'),
136 - 'type' => Controls_Manager::SWITCHER,
137 - 'default' => 'yes',
138 - 'label_on' => __('Show', 'fluentform'),
139 - 'label_off' => __('Hide', 'fluentform'),
140 - 'return_value' => 'yes'
175 + 'label' => __('Labels ', 'fluentform'),
176 + 'type' => Controls_Manager::SWITCHER,
177 + 'default' => 'yes',
178 + 'label_on' => __('Show', 'fluentform'),
179 + 'label_off' => __('Hide', 'fluentform'),
180 + 'return_value' => 'yes',
141 181 ]
142 182 );
143 183
144 184 $this->add_control(
@@ -143,13 +183,13 @@
143 183
144 184 $this->add_control(
145 185 'placeholder_switch',
146 186 [
147 - 'label' => __('Placeholder', 'fluentform'),
148 - 'type' => Controls_Manager::SWITCHER,
149 - 'default' => 'yes',
150 - 'label_on' => __('Show', 'fluentform'),
151 - 'label_off' => __('Hide', 'fluentform'),
187 + 'label' => __('Placeholder', 'fluentform'),
188 + 'type' => Controls_Manager::SWITCHER,
189 + 'default' => 'yes',
190 + 'label_on' => __('Show', 'fluentform'),
191 + 'label_off' => __('Hide', 'fluentform'),
152 192 'return_value' => 'yes',
153 193 ]
154 194 );
155 195
@@ -155,9 +195,10 @@
155 195
156 196 $this->end_controls_section();
157 197 }
158 198
159 - protected function register_error_controls(){
199 + protected function register_error_controls()
200 + {
160 201 $this->start_controls_section(
161 202 'section_errors',
162 203 [
163 204 'label' => __('Errors', 'fluentform'),
@@ -166,13 +207,13 @@
166 207
167 208 $this->add_control(
168 209 'error_messages',
169 210 [
170 - 'label' => __('Error Messages', 'fluentform'),
171 - 'type' => Controls_Manager::SWITCHER,
172 - 'default' => 'yes',
173 - 'label_on' => __('Show', 'fluentform'),
174 - 'label_off' => __('Hide', 'fluentform'),
211 + 'label' => __('Error Messages', 'fluentform'),
212 + 'type' => Controls_Manager::SWITCHER,
213 + 'default' => 'yes',
214 + 'label_on' => __('Show', 'fluentform'),
215 + 'label_off' => __('Hide', 'fluentform'),
175 216 'return_value' => 'yes',
176 217 ]
177 218 );
178 219
@@ -178,14 +219,15 @@
178 219
179 220 $this->end_controls_section();
180 221 }
181 222
182 - protected function register_title_description_style_controls(){
223 + protected function register_title_description_style_controls()
224 + {
183 225 $this->start_controls_section(
184 226 'section_form_title_style',
185 227 [
186 - 'label' => __('Title & Description', 'fluentform'),
187 - 'tab' => Controls_Manager::TAB_STYLE,
228 + 'label' => __('Title & Description', 'fluentform'),
229 + 'tab' => Controls_Manager::TAB_STYLE,
188 230 'condition' => [
189 231 'custom_title_description' => 'yes',
190 232 ],
191 233 ]
@@ -193,27 +235,27 @@
193 235
194 236 $this->add_responsive_control(
195 237 'heading_alignment',
196 238 [
197 - 'label' => __('Alignment', 'fluentform'),
198 - 'type' => Controls_Manager::CHOOSE,
239 + 'label' => __('Alignment', 'fluentform'),
240 + 'type' => Controls_Manager::CHOOSE,
199 241 'options' => [
200 242 'left' => [
201 243 'title' => __('Left', 'fluentform'),
202 - 'icon' => 'fa fa-align-left',
244 + 'icon' => 'fa fa-align-left',
203 245 ],
204 246 'center' => [
205 247 'title' => __('Center', 'fluentform'),
206 - 'icon' => 'fa fa-align-center',
248 + 'icon' => 'fa fa-align-center',
207 249 ],
208 250 'right' => [
209 251 'title' => __('Right', 'fluentform'),
210 - 'icon' => 'fa fa-align-right',
252 + 'icon' => 'fa fa-align-right',
211 253 ],
212 254 ],
213 - 'default' => '',
255 + 'default' => '',
214 256 'selectors' => [
215 - '{{WRAPPER}} .fluentform-widget-title' => 'text-align: {{VALUE}};',
257 + '{{WRAPPER}} .fluentform-widget-title' => 'text-align: {{VALUE}};',
216 258 '{{WRAPPER}} .fluentform-widget-description' => 'text-align: {{VALUE}};',
217 259 ],
218 260 'condition' => [
219 261 'custom_title_description' => 'yes',
@@ -223,10 +265,10 @@
223 265
224 266 $this->add_control(
225 267 'heading_title',
226 268 [
227 - 'label' => __('Title', 'fluentform'),
228 - 'type' => Controls_Manager::HEADING,
269 + 'label' => __('Title', 'fluentform'),
270 + 'type' => Controls_Manager::HEADING,
229 271 'separator' => 'before',
230 272 'condition' => [
231 273 'custom_title_description' => 'yes',
232 274 ],
@@ -235,11 +277,11 @@
235 277
236 278 $this->add_control(
237 279 'form_title_text_color',
238 280 [
239 - 'label' => __('Color', 'fluentform'),
240 - 'type' => Controls_Manager::COLOR,
241 - 'default' => '',
281 + 'label' => __('Color', 'fluentform'),
282 + 'type' => Controls_Manager::COLOR,
283 + 'default' => '',
242 284 'selectors' => [
243 285 '{{WRAPPER}} .fluentform-widget-title' => 'color: {{VALUE}}',
244 286 ],
245 287 'condition' => [
@@ -250,11 +292,11 @@
250 292
251 293 $this->add_group_control(
252 294 Group_Control_Typography::get_type(),
253 295 [
254 - 'name' => 'form_title_typography',
255 - 'label' => __('Typography', 'fluentform'),
256 - 'selector' => '{{WRAPPER}} .fluentform-widget-title',
296 + 'name' => 'form_title_typography',
297 + 'label' => __('Typography', 'fluentform'),
298 + 'selector' => '{{WRAPPER}} .fluentform-widget-title',
257 299 'condition' => [
258 300 'custom_title_description' => 'yes',
259 301 ],
260 302 ]
@@ -262,17 +304,17 @@
262 304
263 305 $this->add_responsive_control(
264 306 'form_title_margin',
265 307 [
266 - 'label' => __('Margin', 'fluentform'),
267 - 'type' => Controls_Manager::DIMENSIONS,
268 - 'size_units' => ['px', 'em', '%'],
308 + 'label' => __('Margin', 'fluentform'),
309 + 'type' => Controls_Manager::DIMENSIONS,
310 + 'size_units' => ['px', 'em', '%'],
269 311 'allowed_dimensions' => 'vertical',
270 - 'placeholder' => [
271 - 'top' => '',
272 - 'right' => 'auto',
312 + 'placeholder' => [
313 + 'top' => '',
314 + 'right' => 'auto',
273 315 'bottom' => '',
274 - 'left' => 'auto',
316 + 'left' => 'auto',
275 317 ],
276 318 'selectors' => [
277 319 '{{WRAPPER}} .fluentform-widget-title' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
278 320 ],
@@ -284,23 +326,22 @@
284 326
285 327 $this->add_responsive_control(
286 328 'form_title_padding',
287 329 [
288 - 'label' => esc_html__('Padding', 'fluentform'),
289 - 'type' => Controls_Manager::DIMENSIONS,
330 + 'label' => esc_html__('Padding', 'fluentform'),
331 + 'type' => Controls_Manager::DIMENSIONS,
290 332 'size_units' => ['px', 'em', '%'],
291 - 'selectors' => [
333 + 'selectors' => [
292 334 '{{WRAPPER}} .fluentform-widget-title' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
293 335 ],
294 336 ]
295 337 );
296 338
297 -
298 339 $this->add_control(
299 340 'heading_description',
300 341 [
301 - 'label' => __('Description', 'fluentform'),
302 - 'type' => Controls_Manager::HEADING,
342 + 'label' => __('Description', 'fluentform'),
343 + 'type' => Controls_Manager::HEADING,
303 344 'separator' => 'before',
304 345 'condition' => [
305 346 'custom_title_description' => 'yes',
306 347 ],
@@ -309,11 +350,11 @@
309 350
310 351 $this->add_control(
311 352 'heading_description_text_color',
312 353 [
313 - 'label' => __('Color', 'fluentform'),
314 - 'type' => Controls_Manager::COLOR,
315 - 'default' => '',
354 + 'label' => __('Color', 'fluentform'),
355 + 'type' => Controls_Manager::COLOR,
356 + 'default' => '',
316 357 'selectors' => [
317 358 '{{WRAPPER}} .fluentform-widget-description' => 'color: {{VALUE}}',
318 359 ],
319 360 'condition' => [
@@ -324,12 +365,14 @@
324 365
325 366 $this->add_group_control(
326 367 Group_Control_Typography::get_type(),
327 368 [
328 - 'name' => 'heading_description_typography',
329 - 'label' => __('Typography', 'fluentform'),
330 - 'scheme' => Scheme_Typography::TYPOGRAPHY_4,
331 - 'selector' => '{{WRAPPER}} .fluentform-widget-description',
369 + 'name' => 'heading_description_typography',
370 + 'label' => __('Typography', 'fluentform'),
371 + 'selector' => '{{WRAPPER}} .fluentform-widget-description',
372 + 'global' => [
373 + 'default' => Global_Typography::TYPOGRAPHY_ACCENT,
374 + ],
332 375 'condition' => [
333 376 'custom_title_description' => 'yes',
334 377 ],
335 378 ]
@@ -334,21 +377,20 @@
334 377 ],
335 378 ]
336 379 );
337 380
338 -
339 381 $this->add_responsive_control(
340 382 'heading_description_margin',
341 383 [
342 - 'label' => __('Margin', 'fluentform'),
343 - 'type' => Controls_Manager::DIMENSIONS,
344 - 'size_units' => ['px', 'em', '%'],
384 + 'label' => __('Margin', 'fluentform'),
385 + 'type' => Controls_Manager::DIMENSIONS,
386 + 'size_units' => ['px', 'em', '%'],
345 387 'allowed_dimensions' => 'vertical',
346 - 'placeholder' => [
347 - 'top' => '',
348 - 'right' => 'auto',
388 + 'placeholder' => [
389 + 'top' => '',
390 + 'right' => 'auto',
349 391 'bottom' => '',
350 - 'left' => 'auto',
392 + 'left' => 'auto',
351 393 ],
352 394 'selectors' => [
353 395 '{{WRAPPER}} .fluentform-widget-description' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
354 396 ],
@@ -360,12 +402,12 @@
360 402
361 403 $this->add_responsive_control(
362 404 'heading_description_padding',
363 405 [
364 - 'label' => esc_html__('Padding', 'fluentform'),
365 - 'type' => Controls_Manager::DIMENSIONS,
406 + 'label' => esc_html__('Padding', 'fluentform'),
407 + 'type' => Controls_Manager::DIMENSIONS,
366 408 'size_units' => ['px', 'em', '%'],
367 - 'selectors' => [
409 + 'selectors' => [
368 410 '{{WRAPPER}} .fluentform-widget-description' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
369 411 ],
370 412 ]
371 413 );
@@ -372,36 +414,34 @@
372 414
373 415 $this->end_controls_section();
374 416 }
375 417
376 - protected function register_form_container_style_controls(){
377 -
418 + protected function register_form_container_style_controls()
419 + {
378 420 $this->start_controls_section(
379 421 'section_form_container_style',
380 422 [
381 423 'label' => __('Form Container', 'fluentform'),
382 - 'tab' => Controls_Manager::TAB_STYLE,
424 + 'tab' => Controls_Manager::TAB_STYLE,
383 425 ]
384 426 );
385 427
386 -
387 428 $this->add_group_control(
388 429 Group_Control_Background::get_type(),
389 430 [
390 - 'name' => 'form_container_background',
391 - 'label' => __( 'Background', 'fluentform' ),
392 - 'types' => [ 'classic', 'gradient' ],
431 + 'name' => 'form_container_background',
432 + 'label' => __('Background', 'fluentform'),
433 + 'types' => ['classic', 'gradient'],
393 434 'selector' => '{{WRAPPER}} .fluentform-widget-wrapper',
394 435 ]
395 436 );
396 437
397 -
398 438 $this->add_control(
399 439 'form_container_link_color',
400 440 [
401 - 'label' => __('Link Color', 'fluentform'),
402 - 'type' => Controls_Manager::COLOR,
403 - 'default' => '',
441 + 'label' => __('Link Color', 'fluentform'),
442 + 'type' => Controls_Manager::COLOR,
443 + 'default' => '',
404 444 'selectors' => [
405 445 '{{WRAPPER}} .fluentform-widget-wrapper .ff-el-group a' => 'color: {{VALUE}};',
406 446 ],
407 447 ]
@@ -409,12 +449,12 @@
409 449
410 450 $this->add_responsive_control(
411 451 'form_container_max_width',
412 452 [
413 - 'label' => esc_html__('Max Width', 'fluentform'),
414 - 'type' => Controls_Manager::SLIDER,
453 + 'label' => esc_html__('Max Width', 'fluentform'),
454 + 'type' => Controls_Manager::SLIDER,
415 455 'size_units' => ['px', 'em', '%'],
416 - 'range' => [
456 + 'range' => [
417 457 'px' => [
418 458 'min' => 10,
419 459 'max' => 1500,
420 460 ],
@@ -423,9 +463,9 @@
423 463 'max' => 80,
424 464 ],
425 465 ],
426 466 'selectors' => [
427 - '{{WRAPPER}} .fluentform-widget-wrapper' => 'width: {{SIZE}}{{UNIT}};'
467 + '{{WRAPPER}} .fluentform-widget-wrapper' => 'width: {{SIZE}}{{UNIT}};',
428 468 ],
429 469 ]
430 470 );
431 471
@@ -431,27 +471,27 @@
431 471
432 472 $this->add_responsive_control(
433 473 'form_container_alignment',
434 474 [
435 - 'label' => esc_html__('Alignment', 'fluentform'),
436 - 'type' => Controls_Manager::CHOOSE,
475 + 'label' => esc_html__('Alignment', 'fluentform'),
476 + 'type' => Controls_Manager::CHOOSE,
437 477 'label_block' => true,
438 - 'options' => [
478 + 'options' => [
439 479 'default' => [
440 480 'title' => __('Default', 'fluentform'),
441 - 'icon' => 'fa fa-ban',
481 + 'icon' => 'fa fa-ban',
442 482 ],
443 483 'left' => [
444 484 'title' => esc_html__('Left', 'fluentform'),
445 - 'icon' => 'eicon-h-align-left',
485 + 'icon' => 'eicon-h-align-left',
446 486 ],
447 487 'center' => [
448 488 'title' => esc_html__('Center', 'fluentform'),
449 - 'icon' => 'eicon-h-align-center',
489 + 'icon' => 'eicon-h-align-center',
450 490 ],
451 491 'right' => [
452 492 'title' => esc_html__('Right', 'fluentform'),
453 - 'icon' => 'eicon-h-align-right',
493 + 'icon' => 'eicon-h-align-right',
454 494 ],
455 495 ],
456 496 'default' => 'default',
457 497 ]
@@ -459,12 +499,12 @@
459 499
460 500 $this->add_responsive_control(
461 501 'form_container_margin',
462 502 [
463 - 'label' => esc_html__('Margin', 'fluentform'),
464 - 'type' => Controls_Manager::DIMENSIONS,
503 + 'label' => esc_html__('Margin', 'fluentform'),
504 + 'type' => Controls_Manager::DIMENSIONS,
465 505 'size_units' => ['px', 'em', '%'],
466 - 'selectors' => [
506 + 'selectors' => [
467 507 '{{WRAPPER}} .fluentform-widget-wrapper' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
468 508 ],
469 509 ]
470 510 );
@@ -471,22 +511,21 @@
471 511
472 512 $this->add_responsive_control(
473 513 'form_container_padding',
474 514 [
475 - 'label' => esc_html__('Padding', 'fluentform'),
476 - 'type' => Controls_Manager::DIMENSIONS,
515 + 'label' => esc_html__('Padding', 'fluentform'),
516 + 'type' => Controls_Manager::DIMENSIONS,
477 517 'size_units' => ['px', 'em', '%'],
478 - 'selectors' => [
518 + 'selectors' => [
479 519 '{{WRAPPER}} .fluentform-widget-wrapper' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
480 520 ],
481 521 ]
482 522 );
483 523
484 -
485 524 $this->add_group_control(
486 525 Group_Control_Border::get_type(),
487 526 [
488 - 'name' => 'form_container_border',
527 + 'name' => 'form_container_border',
489 528 'selector' => '{{WRAPPER}} .fluentform-widget-wrapper',
490 529 ]
491 530 );
492 531
@@ -492,13 +531,13 @@
492 531
493 532 $this->add_control(
494 533 'form_container_border_radius',
495 534 [
496 - 'label' => esc_html__('Border Radius', 'fluentform'),
497 - 'type' => Controls_Manager::DIMENSIONS,
498 - 'separator' => 'before',
535 + 'label' => esc_html__('Border Radius', 'fluentform'),
536 + 'type' => Controls_Manager::DIMENSIONS,
537 + 'separator' => 'before',
499 538 'size_units' => ['px'],
500 - 'selectors' => [
539 + 'selectors' => [
501 540 '{{WRAPPER}} .fluentform-widget-wrapper' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
502 541 ],
503 542 ]
504 543 );
@@ -505,57 +544,91 @@
505 544
506 545 $this->add_group_control(
507 546 Group_Control_Box_Shadow::get_type(),
508 547 [
509 - 'name' => 'form_container_box_shadow',
548 + 'name' => 'form_container_box_shadow',
510 549 'selector' => '{{WRAPPER}} .fluentform-widget-wrapper',
511 550 ]
512 551 );
513 552
514 553 $this->end_controls_section();
515 -
516 554 }
517 555
518 - protected function register_label_style_controls(){
519 -
556 + protected function register_label_style_controls()
557 + {
520 558 $this->start_controls_section(
521 559 'section_form_label_style',
522 560 [
523 561 'label' => __('Labels', 'fluentform'),
524 - 'tab' => Controls_Manager::TAB_STYLE,
562 + 'tab' => Controls_Manager::TAB_STYLE,
525 563 ]
526 564 );
527 -
528 565 $this->add_control(
529 566 'form_label_text_color',
530 567 [
531 - 'label' => __('Text Color', 'fluentform'),
532 - 'type' => Controls_Manager::COLOR,
568 + 'label' => __('Text Color', 'fluentform'),
569 + 'type' => Controls_Manager::COLOR,
533 570 'selectors' => [
534 571 '{{WRAPPER}} .fluentform-widget-wrapper .ff-el-input--label label' => 'color: {{VALUE}}',
535 572 ],
536 573 ]
537 574 );
538 -
575 +
539 576 $this->add_group_control(
540 577 Group_Control_Typography::get_type(),
541 578 [
542 - 'name' => 'form_label_typography',
543 - 'label' => __('Typography', 'fluentform'),
579 + 'name' => 'form_label_typography',
580 + 'label' => __('Typography', 'fluentform'),
544 581 'selector' => '{{WRAPPER}} .fluentform-widget-wrapper .ff-el-input--label label',
545 582 ]
546 583 );
584 +
585 + $this->add_control(
586 + 'form_label_asterisk_color',
587 + [
588 + 'label' => __('Asterisk Color', 'fluentform'),
589 + 'type' => Controls_Manager::COLOR,
590 + 'selectors' => [
591 + '{{WRAPPER}} .ff-el-is-required.asterisk-right label:after' => 'color: {{VALUE}} !important',
592 + ],
593 + ]
594 + );
595 + $this->add_control(
596 + 'form_label_asterisk_size',
597 + [
598 + 'label' => __('Asterisk Size', 'fluentform'),
599 + 'type' => Controls_Manager::SLIDER,
600 + 'range' => [
601 + 'px' => [
602 + 'min' => 0,
603 + 'max' => 30,
604 + 'step' => 1,
605 + ],
606 + '%' => [
607 + 'min' => 0,
608 + 'max' => 30,
609 + 'step' => 1,
610 + ],
611 + ],
612 + 'size_units' => ['px', 'em', '%'],
613 + 'selectors' => [
614 + '{{WRAPPER}} .ff-el-is-required.asterisk-right label:after' => 'font-size: {{SIZE}}{{UNIT}}',
615 + ],
616 + 'separator' => 'before',
617 + ]
618 + );
619 +
547 620
548 621 $this->end_controls_section();
549 622 }
550 623
551 - protected function register_input_textarea_style_controls(){
552 -
624 + protected function register_input_textarea_style_controls()
625 + {
553 626 $this->start_controls_section(
554 627 'section_form_fields_style',
555 628 [
556 - 'label' => __('Input & Textarea', 'fluentform'),
557 - 'tab' => Controls_Manager::TAB_STYLE,
629 + 'label' => __('Input & Text Area', 'fluentform'),
630 + 'tab' => Controls_Manager::TAB_STYLE,
558 631 ]
559 632 );
560 633
561 634 $this->add_responsive_control(
@@ -560,25 +633,25 @@
560 633
561 634 $this->add_responsive_control(
562 635 'input_alignment',
563 636 [
564 - 'label' => __('Alignment', 'fluentform'),
565 - 'type' => Controls_Manager::CHOOSE,
637 + 'label' => __('Alignment', 'fluentform'),
638 + 'type' => Controls_Manager::CHOOSE,
566 639 'options' => [
567 640 'left' => [
568 641 'title' => __('Left', 'fluentform'),
569 - 'icon' => 'fa fa-align-left',
642 + 'icon' => 'fa fa-align-left',
570 643 ],
571 644 'center' => [
572 645 'title' => __('Center', 'fluentform'),
573 - 'icon' => 'fa fa-align-center',
646 + 'icon' => 'fa fa-align-center',
574 647 ],
575 648 'right' => [
576 649 'title' => __('Right', 'fluentform'),
577 - 'icon' => 'fa fa-align-right',
650 + 'icon' => 'fa fa-align-right',
578 651 ],
579 652 ],
580 - 'default' => '',
653 + 'default' => '',
581 654 'selectors' => [
582 655 '{{WRAPPER}} .fluentform-widget-wrapper input:not([type=radio]):not([type=checkbox]):not([type=submit]):not([type=button]):not([type=image]):not([type=file]), {{WRAPPER}} .fluentform-widget-wrapper .ff-el-group textarea, {{WRAPPER}} .fluentform-widget-wrapper .ff-el-group select' => 'text-align: {{VALUE}};',
583 656 ],
584 657 ]
@@ -595,11 +668,11 @@
595 668
596 669 $this->add_control(
597 670 'form_field_bg_color',
598 671 [
599 - 'label' => __('Background Color', 'fluentform'),
600 - 'type' => Controls_Manager::COLOR,
601 - 'default' => '',
672 + 'label' => __('Background Color', 'fluentform'),
673 + 'type' => Controls_Manager::COLOR,
674 + 'default' => '',
602 675 'selectors' => [
603 676 '{{WRAPPER}} .fluentform-widget-wrapper input:not([type=radio]):not([type=checkbox]):not([type=submit]):not([type=button]):not([type=image]):not([type=file]):not(.select2-search__field), {{WRAPPER}} .fluentform-widget-wrapper .ff-el-group textarea, {{WRAPPER}} .fluentform-widget-wrapper .ff-el-group select, {{WRAPPER}} .fluentform-widget-wrapper .ff-el-group .select2-container--default .select2-selection--multiple' => 'background-color: {{VALUE}}',
604 677 ],
605 678 ]
@@ -607,11 +680,11 @@
607 680
608 681 $this->add_control(
609 682 'form_field_text_color',
610 683 [
611 - 'label' => __('Text Color', 'fluentform'),
612 - 'type' => Controls_Manager::COLOR,
613 - 'default' => '',
684 + 'label' => __('Text Color', 'fluentform'),
685 + 'type' => Controls_Manager::COLOR,
686 + 'default' => '',
614 687 'selectors' => [
615 688 '{{WRAPPER}} .fluentform-widget-wrapper input:not([type=radio]):not([type=checkbox]):not([type=submit]):not([type=button]):not([type=image]):not([type=file]), {{WRAPPER}} .fluentform-widget-wrapper .ff-el-group textarea, {{WRAPPER}} .fluentform-widget-wrapper .ff-el-group select' => 'color: {{VALUE}}',
616 689 ],
617 690 ]
@@ -619,14 +692,14 @@
619 692
620 693 $this->add_group_control(
621 694 Group_Control_Border::get_type(),
622 695 [
623 - 'name' => 'form_field_border',
624 - 'label' => __('Border', 'fluentform'),
696 + 'name' => 'form_field_border',
697 + 'label' => __('Border', 'fluentform'),
625 698 'placeholder' => '1px',
626 - 'default' => '1px',
627 - 'selector' => '{{WRAPPER}} .fluentform-widget-wrapper input:not([type=radio]):not([type=checkbox]):not([type=submit]):not([type=button]):not([type=image]):not([type=file]):not(.select2-search__field), {{WRAPPER}} .fluentform-widget-wrapper .ff-el-group textarea, {{WRAPPER}} .fluentform-widget-wrapper .ff-el-group select, {{WRAPPER}} .fluentform-widget-wrapper .ff-el-group .select2-container--default .select2-selection--multiple',
628 - 'separator' => 'before',
699 + 'default' => '1px',
700 + 'selector' => '{{WRAPPER}} .fluentform-widget-wrapper input:not([type=radio]):not([type=checkbox]):not([type=submit]):not([type=button]):not([type=image]):not([type=file]):not(.select2-search__field), {{WRAPPER}} .fluentform-widget-wrapper .ff-el-group textarea, {{WRAPPER}} .fluentform-widget-wrapper .ff-el-group select, {{WRAPPER}} .fluentform-widget-wrapper .ff-el-group .select2-container--default .select2-selection--multiple',
701 + 'separator' => 'before',
629 702 ]
630 703 );
631 704
632 705 $this->add_control(
@@ -631,12 +704,12 @@
631 704
632 705 $this->add_control(
633 706 'form_field_radius',
634 707 [
635 - 'label' => __('Border Radius', 'fluentform'),
636 - 'type' => Controls_Manager::DIMENSIONS,
708 + 'label' => __('Border Radius', 'fluentform'),
709 + 'type' => Controls_Manager::DIMENSIONS,
637 710 'size_units' => ['px', 'em', '%'],
638 - 'selectors' => [
711 + 'selectors' => [
639 712 '{{WRAPPER}} .fluentform-widget-wrapper input:not([type=radio]):not([type=checkbox]):not([type=submit]):not([type=button]):not([type=image]):not([type=file]), {{WRAPPER}} .fluentform-widget-wrapper .ff-el-group textarea, {{WRAPPER}} .fluentform-widget-wrapper .ff-el-group select, {{WRAPPER}} .fluentform-widget-wrapper .ff-el-group .select2-container--default .select2-selection--multiple' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
640 713 ],
641 714 ]
642 715 );
@@ -644,23 +717,23 @@
644 717 $this->add_responsive_control(
645 718 'form_field_text_indent',
646 719 [
647 720 'label' => __('Text Indent', 'fluentform'),
648 - 'type' => Controls_Manager::SLIDER,
721 + 'type' => Controls_Manager::SLIDER,
649 722 'range' => [
650 723 'px' => [
651 - 'min' => 0,
652 - 'max' => 60,
724 + 'min' => 0,
725 + 'max' => 60,
653 726 'step' => 1,
654 727 ],
655 728 '%' => [
656 - 'min' => 0,
657 - 'max' => 30,
729 + 'min' => 0,
730 + 'max' => 30,
658 731 'step' => 1,
659 732 ],
660 733 ],
661 734 'size_units' => ['px', 'em', '%'],
662 - 'selectors' => [
735 + 'selectors' => [
663 736 '{{WRAPPER}} .fluentform-widget-wrapper input:not([type=radio]):not([type=checkbox]):not([type=submit]):not([type=button]):not([type=image]):not([type=file]), {{WRAPPER}} .fluentform-widget-wrapper .ff-el-group textarea, {{WRAPPER}} .fluentform-widget-wrapper .ff-el-group select' => 'text-indent: {{SIZE}}{{UNIT}}',
664 737 ],
665 738 'separator' => 'before',
666 739 ]
@@ -669,18 +742,18 @@
669 742 $this->add_responsive_control(
670 743 'form_input_width',
671 744 [
672 745 'label' => __('Input Width', 'fluentform'),
673 - 'type' => Controls_Manager::SLIDER,
746 + 'type' => Controls_Manager::SLIDER,
674 747 'range' => [
675 748 'px' => [
676 - 'min' => 0,
677 - 'max' => 1200,
749 + 'min' => 0,
750 + 'max' => 1200,
678 751 'step' => 1,
679 752 ],
680 753 ],
681 754 'size_units' => ['px', 'em', '%'],
682 - 'selectors' => [
755 + 'selectors' => [
683 756 '{{WRAPPER}} .fluentform-widget-wrapper input:not([type=radio]):not([type=checkbox]):not([type=submit]):not([type=button]):not([type=image]):not([type=file]), {{WRAPPER}} .fluentform-widget-wrapper .ff-el-group select' => 'width: {{SIZE}}{{UNIT}}',
684 757 ],
685 758 ]
686 759 );
@@ -688,18 +761,18 @@
688 761 $this->add_responsive_control(
689 762 'form_input_height',
690 763 [
691 764 'label' => __('Input Height', 'fluentform'),
692 - 'type' => Controls_Manager::SLIDER,
765 + 'type' => Controls_Manager::SLIDER,
693 766 'range' => [
694 767 'px' => [
695 - 'min' => 0,
696 - 'max' => 80,
768 + 'min' => 0,
769 + 'max' => 80,
697 770 'step' => 1,
698 771 ],
699 772 ],
700 773 'size_units' => ['px', 'em', '%'],
701 - 'selectors' => [
774 + 'selectors' => [
702 775 '{{WRAPPER}} .fluentform-widget-wrapper input:not([type=radio]):not([type=checkbox]):not([type=submit]):not([type=button]):not([type=image]):not([type=file]), {{WRAPPER}} .fluentform-widget-wrapper .ff-el-group select' => 'height: {{SIZE}}{{UNIT}}',
703 776 ],
704 777 ]
705 778 );
@@ -707,18 +780,18 @@
707 780 $this->add_responsive_control(
708 781 'form_textarea_width',
709 782 [
710 783 'label' => __('Textarea Width', 'fluentform'),
711 - 'type' => Controls_Manager::SLIDER,
784 + 'type' => Controls_Manager::SLIDER,
712 785 'range' => [
713 786 'px' => [
714 - 'min' => 0,
715 - 'max' => 1200,
787 + 'min' => 0,
788 + 'max' => 1200,
716 789 'step' => 1,
717 790 ],
718 791 ],
719 792 'size_units' => ['px', 'em', '%'],
720 - 'selectors' => [
793 + 'selectors' => [
721 794 '{{WRAPPER}} .fluentform-widget-wrapper .ff-el-group textarea' => 'width: {{SIZE}}{{UNIT}}',
722 795 ],
723 796 ]
724 797 );
@@ -726,18 +799,18 @@
726 799 $this->add_responsive_control(
727 800 'form_textarea_height',
728 801 [
729 802 'label' => __('Textarea Height', 'fluentform'),
730 - 'type' => Controls_Manager::SLIDER,
803 + 'type' => Controls_Manager::SLIDER,
731 804 'range' => [
732 805 'px' => [
733 - 'min' => 0,
734 - 'max' => 400,
806 + 'min' => 0,
807 + 'max' => 400,
735 808 'step' => 1,
736 809 ],
737 810 ],
738 811 'size_units' => ['px', 'em', '%'],
739 - 'selectors' => [
812 + 'selectors' => [
740 813 '{{WRAPPER}} .fluentform-widget-wrapper .ff-el-group textarea' => 'height: {{SIZE}}{{UNIT}}',
741 814 ],
742 815 ]
743 816 );
@@ -744,12 +817,12 @@
744 817
745 818 $this->add_responsive_control(
746 819 'form_field_padding',
747 820 [
748 - 'label' => __('Padding', 'fluentform'),
749 - 'type' => Controls_Manager::DIMENSIONS,
821 + 'label' => __('Padding', 'fluentform'),
822 + 'type' => Controls_Manager::DIMENSIONS,
750 823 'size_units' => ['px', 'em', '%'],
751 - 'selectors' => [
824 + 'selectors' => [
752 825 '{{WRAPPER}} .fluentform-widget-wrapper input:not([type=radio]):not([type=checkbox]):not([type=submit]):not([type=button]):not([type=image]):not([type=file]), {{WRAPPER}} .fluentform-widget-wrapper .ff-el-group textarea, {{WRAPPER}} .fluentform-widget-wrapper .ff-el-group select' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
753 826 ],
754 827 ]
755 828 );
@@ -757,18 +830,18 @@
757 830 $this->add_responsive_control(
758 831 'form_field_spacing',
759 832 [
760 833 'label' => __('Spacing', 'fluentform'),
761 - 'type' => Controls_Manager::SLIDER,
834 + 'type' => Controls_Manager::SLIDER,
762 835 'range' => [
763 836 'px' => [
764 - 'min' => 0,
765 - 'max' => 100,
837 + 'min' => 0,
838 + 'max' => 100,
766 839 'step' => 1,
767 840 ],
768 841 ],
769 842 'size_units' => ['px', 'em', '%'],
770 - 'selectors' => [
843 + 'selectors' => [
771 844 '{{WRAPPER}} .fluentform-widget-wrapper .ff-el-group' => 'margin-bottom: {{SIZE}}{{UNIT}}',
772 845 ],
773 846 ]
774 847 );
@@ -775,11 +848,11 @@
775 848
776 849 $this->add_group_control(
777 850 Group_Control_Typography::get_type(),
778 851 [
779 - 'name' => 'form_field_typography',
780 - 'label' => __('Typography', 'fluentform'),
781 - 'selector' => '{{WRAPPER}} .fluentform-widget-wrapper input:not([type=radio]):not([type=checkbox]):not([type=submit]):not([type=button]):not([type=image]):not([type=file]), {{WRAPPER}} .fluentform-widget-wrapper .ff-el-group textarea, {{WRAPPER}} .fluentform-widget-wrapper .ff-el-group select',
852 + 'name' => 'form_field_typography',
853 + 'label' => __('Typography', 'fluentform'),
854 + 'selector' => '{{WRAPPER}} .fluentform-widget-wrapper input:not([type=radio]):not([type=checkbox]):not([type=submit]):not([type=button]):not([type=image]):not([type=file]), {{WRAPPER}} .fluentform-widget-wrapper .ff-el-group textarea, {{WRAPPER}} .fluentform-widget-wrapper .ff-el-group select',
782 855 'separator' => 'before',
783 856 ]
784 857 );
785 858
@@ -785,10 +858,10 @@
785 858
786 859 $this->add_group_control(
787 860 Group_Control_Box_Shadow::get_type(),
788 861 [
789 - 'name' => 'form_field_box_shadow',
790 - 'selector' => '{{WRAPPER}} .fluentform-widget-wrapper input:not([type=radio]):not([type=checkbox]):not([type=submit]):not([type=button]):not([type=image]):not([type=file]), {{WRAPPER}} .fluentform-widget-wrapper .ff-el-group textarea, {{WRAPPER}} .fluentform-widget-wrapper .ff-el-group select',
862 + 'name' => 'form_field_box_shadow',
863 + 'selector' => '{{WRAPPER}} .fluentform-widget-wrapper input:not([type=radio]):not([type=checkbox]):not([type=submit]):not([type=button]):not([type=image]):not([type=file]), {{WRAPPER}} .fluentform-widget-wrapper .ff-el-group textarea, {{WRAPPER}} .fluentform-widget-wrapper .ff-el-group select',
791 864 'separator' => 'before',
792 865 ]
793 866 );
794 867
@@ -803,11 +876,11 @@
803 876
804 877 $this->add_control(
805 878 'form_field_bg_color_focus',
806 879 [
807 - 'label' => __('Background Color', 'fluentform'),
808 - 'type' => Controls_Manager::COLOR,
809 - 'default' => '',
880 + 'label' => __('Background Color', 'fluentform'),
881 + 'type' => Controls_Manager::COLOR,
882 + 'default' => '',
810 883 'selectors' => [
811 884 '{{WRAPPER}} .fluentform-widget-wrapper input:not([type=radio]):not([type=checkbox]):not([type=submit]):not([type=button]):not([type=image]):not([type=file]):focus, {{WRAPPER}} .fluentform-widget-wrapper .ff-el-group textarea:focus' => 'background-color: {{VALUE}}',
812 885 ],
813 886 ]
@@ -815,13 +888,13 @@
815 888
816 889 $this->add_group_control(
817 890 Group_Control_Border::get_type(),
818 891 [
819 - 'name' => 'form_input_focus_border',
820 - 'label' => __('Border', 'fluentform'),
892 + 'name' => 'form_input_focus_border',
893 + 'label' => __('Border', 'fluentform'),
821 894 'placeholder' => '1px',
822 - 'default' => '1px',
823 - 'selector' => '{{WRAPPER}} .fluentform-widget-wrapper input:not([type=radio]):not([type=checkbox]):not([type=submit]):not([type=button]):not([type=image]):not([type=file]):focus, {{WRAPPER}} .fluentform-widget-wrapper .ff-el-group textarea:focus',
895 + 'default' => '1px',
896 + 'selector' => '{{WRAPPER}} .fluentform-widget-wrapper input:not([type=radio]):not([type=checkbox]):not([type=submit]):not([type=button]):not([type=image]):not([type=file]):focus, {{WRAPPER}} .fluentform-widget-wrapper .ff-el-group textarea:focus',
824 897 ]
825 898 );
826 899
827 900 $this->add_group_control(
@@ -826,10 +899,10 @@
826 899
827 900 $this->add_group_control(
828 901 Group_Control_Box_Shadow::get_type(),
829 902 [
830 - 'name' => 'form_input_focus_box_shadow',
831 - 'selector' => '{{WRAPPER}} .fluentform-widget-wrapper input:not([type=radio]):not([type=checkbox]):not([type=submit]):not([type=button]):not([type=image]):not([type=file]):focus, {{WRAPPER}} .fluentform-widget-wrapper .ff-el-group textarea:focus',
903 + 'name' => 'form_input_focus_box_shadow',
904 + 'selector' => '{{WRAPPER}} .fluentform-widget-wrapper input:not([type=radio]):not([type=checkbox]):not([type=submit]):not([type=button]):not([type=image]):not([type=file]):focus, {{WRAPPER}} .fluentform-widget-wrapper .ff-el-group textarea:focus',
832 905 'separator' => 'before',
833 906 ]
834 907 );
835 908
@@ -839,14 +912,71 @@
839 912
840 913 $this->end_controls_section();
841 914 }
842 915
843 - protected function register_placeholder_style_controls(){
916 + protected function register_terms_gdpr_style_controls()
917 + {
844 918 $this->start_controls_section(
919 + 'section_form_terms_gdpr_style',
920 + [
921 + 'label' => __('GDPR , Terms & Condition ', 'fluentform'),
922 + 'tab' => Controls_Manager::TAB_STYLE,
923 + ]
924 + );
925 +
926 + $this->add_responsive_control(
927 + 'form_terms_gdpr_alignment',
928 + [
929 + 'label' => __('Alignment', 'fluentform'),
930 + 'type' => Controls_Manager::CHOOSE,
931 + 'options' => [
932 + 'left' => [
933 + 'title' => __('Left', 'fluentform'),
934 + 'icon' => 'fa fa-align-left',
935 + ],
936 + 'center' => [
937 + 'title' => __('Center', 'fluentform'),
938 + 'icon' => 'fa fa-align-center',
939 + ],
940 + 'right' => [
941 + 'title' => __('Right', 'fluentform'),
942 + 'icon' => 'fa fa-align-right',
943 + ],
944 + ],
945 + 'default' => '',
946 + 'selectors' => ['{{WRAPPER}} .fluentform-widget-wrapper .ff_t_c' => 'text-align: {{VALUE}};'],
947 + ]
948 + );
949 +
950 + $this->add_group_control(
951 + Group_Control_Typography::get_type(),
952 + [
953 + 'name' => 'form_terms_gdpr_typography',
954 + 'label' => __('Typography', 'fluentform'),
955 + 'selector' => '{{WRAPPER}} .fluentform-widget-wrapper .ff_t_c ',
956 +
957 + ]
958 + );
959 + $this->add_control(
960 + 'form_terms_gdpr_color',
961 + [
962 + 'label' => __('Color', 'fluentform'),
963 + 'type' => Controls_Manager::COLOR,
964 + 'default' => '',
965 + 'selectors' => ['{{WRAPPER}} .fluentform-widget-wrapper .ff_t_c ' => 'color: {{VALUE}};'],
966 + ]
967 + );
968 +
969 + $this->end_controls_section();
970 + }
971 +
972 + protected function register_placeholder_style_controls()
973 + {
974 + $this->start_controls_section(
845 975 'section_placeholder_style',
846 976 [
847 - 'label' => __('Placeholder', 'fluentform'),
848 - 'tab' => Controls_Manager::TAB_STYLE,
977 + 'label' => __('Placeholder', 'fluentform'),
978 + 'tab' => Controls_Manager::TAB_STYLE,
849 979 'condition' => [
850 980 'placeholder_switch' => 'yes',
851 981 ],
852 982 ]
@@ -854,10 +984,10 @@
854 984
855 985 $this->add_control(
856 986 'form_placeholder_text_color',
857 987 [
858 - 'label' => __('Text Color', 'fluentform'),
859 - 'type' => Controls_Manager::COLOR,
988 + 'label' => __('Text Color', 'fluentform'),
989 + 'type' => Controls_Manager::COLOR,
860 990 'selectors' => [
861 991 '{{WRAPPER}} .fluentform-widget-wrapper .ff-el-group input::-webkit-input-placeholder, {{WRAPPER}} .fluentform-widget-wrapper .ff-el-group textarea::-webkit-input-placeholder' => 'color: {{VALUE}}',
862 992 ],
863 993 'condition' => [
@@ -868,15 +998,15 @@
868 998
869 999 $this->end_controls_section();
870 1000 }
871 1001
872 - protected function register_radio_checkbox_style_controls(){
873 -
1002 + protected function register_radio_checkbox_style_controls()
1003 + {
874 1004 $this->start_controls_section(
875 1005 'section_form_radio_checkbox_style',
876 1006 [
877 1007 'label' => __('Radio & Checkbox', 'fluentform'),
878 - 'tab' => Controls_Manager::TAB_STYLE,
1008 + 'tab' => Controls_Manager::TAB_STYLE,
879 1009 ]
880 1010 );
881 1011
882 1012 $this->add_control(
@@ -881,12 +1011,12 @@
881 1011
882 1012 $this->add_control(
883 1013 'form_custom_radio_checkbox',
884 1014 [
885 - 'label' => __('Custom Styles', 'fluentform'),
886 - 'type' => Controls_Manager::SWITCHER,
887 - 'label_on' => __('Yes', 'fluentform'),
888 - 'label_off' => __('No', 'fluentform'),
1015 + 'label' => __('Custom Styles', 'fluentform'),
1016 + 'type' => Controls_Manager::SWITCHER,
1017 + 'label_on' => __('Yes', 'fluentform'),
1018 + 'label_off' => __('No', 'fluentform'),
889 1019 'return_value' => 'yes',
890 1020 ]
891 1021 );
892 1022
@@ -892,10 +1022,10 @@
892 1022
893 1023 $this->add_responsive_control(
894 1024 'form_radio_checkbox_size',
895 1025 [
896 - 'label' => __('Size', 'fluentform'),
897 - 'type' => Controls_Manager::SLIDER,
1026 + 'label' => __('Size', 'fluentform'),
1027 + 'type' => Controls_Manager::SLIDER,
898 1028 'default' => [
899 1029 'size' => '15',
900 1030 'unit' => 'px',
901 1031 ],
@@ -900,15 +1030,15 @@
900 1030 'unit' => 'px',
901 1031 ],
902 1032 'range' => [
903 1033 'px' => [
904 - 'min' => 0,
905 - 'max' => 80,
1034 + 'min' => 0,
1035 + 'max' => 80,
906 1036 'step' => 1,
907 1037 ],
908 1038 ],
909 1039 'size_units' => ['px', 'em', '%'],
910 - 'selectors' => [
1040 + 'selectors' => [
911 1041 '{{WRAPPER}} .fluentform-widget-custom-radio-checkbox input[type="checkbox"], {{WRAPPER}} .fluentform-widget-custom-radio-checkbox input[type="radio"]' => 'width: {{SIZE}}{{UNIT}}; height: {{SIZE}}{{UNIT}}',
912 1042 ],
913 1043 'condition' => [
914 1044 'form_custom_radio_checkbox' => 'yes',
@@ -919,23 +1049,23 @@
919 1049 $this->add_responsive_control(
920 1050 'form_radio_checkbox_text_indent',
921 1051 [
922 1052 'label' => __('Text Indent', 'fluentform'),
923 - 'type' => Controls_Manager::SLIDER,
1053 + 'type' => Controls_Manager::SLIDER,
924 1054 'range' => [
925 1055 'px' => [
926 - 'min' => 0,
927 - 'max' => 60,
1056 + 'min' => 0,
1057 + 'max' => 60,
928 1058 'step' => 1,
929 1059 ],
930 1060 '%' => [
931 - 'min' => 0,
932 - 'max' => 30,
1061 + 'min' => 0,
1062 + 'max' => 30,
933 1063 'step' => 1,
934 1064 ],
935 1065 ],
936 1066 'size_units' => ['px', 'em', '%'],
937 - 'selectors' => [
1067 + 'selectors' => [
938 1068 '{{WRAPPER}} .fluentform-widget-custom-radio-checkbox input[type="checkbox"], {{WRAPPER}} .fluentform-widget-custom-radio-checkbox input[type="radio"]' => 'margin-right: {{SIZE}}{{UNIT}}',
939 1069 ],
940 1070 'condition' => [
941 1071 'form_custom_radio_checkbox' => 'yes',
@@ -947,9 +1077,9 @@
947 1077
948 1078 $this->start_controls_tab(
949 1079 'form_radio_checkbox_normal',
950 1080 [
951 - 'label' => __('Normal', 'fluentform'),
1081 + 'label' => __('Normal', 'fluentform'),
952 1082 'condition' => [
953 1083 'form_custom_radio_checkbox' => 'yes',
954 1084 ],
955 1085 ]
@@ -957,11 +1087,11 @@
957 1087
958 1088 $this->add_control(
959 1089 'form_radio_checkbox_bg_color',
960 1090 [
961 - 'label' => __('Background Color', 'fluentform'),
962 - 'type' => Controls_Manager::COLOR,
963 - 'default' => '',
1091 + 'label' => __('Background Color', 'fluentform'),
1092 + 'type' => Controls_Manager::COLOR,
1093 + 'default' => '',
964 1094 'selectors' => [
965 1095 '{{WRAPPER}} .fluentform-widget-custom-radio-checkbox input[type="checkbox"]:after, {{WRAPPER}} .fluentform-widget-custom-radio-checkbox input[type="radio"]:after' => 'background-color: {{VALUE}}',
966 1096 ],
967 1097 'condition' => [
@@ -973,18 +1103,18 @@
973 1103 $this->add_responsive_control(
974 1104 'form_checkbox_border_width',
975 1105 [
976 1106 'label' => __('Border Width', 'fluentform'),
977 - 'type' => Controls_Manager::SLIDER,
1107 + 'type' => Controls_Manager::SLIDER,
978 1108 'range' => [
979 1109 'px' => [
980 - 'min' => 0,
981 - 'max' => 15,
1110 + 'min' => 0,
1111 + 'max' => 15,
982 1112 'step' => 1,
983 1113 ],
984 1114 ],
985 1115 'size_units' => ['px'],
986 - 'selectors' => [
1116 + 'selectors' => [
987 1117 '{{WRAPPER}} .fluentform-widget-custom-radio-checkbox input[type="checkbox"]:after, {{WRAPPER}} .fluentform-widget-custom-radio-checkbox input[type="radio"]:after' => 'border-width: {{SIZE}}{{UNIT}}',
988 1118 ],
989 1119 'condition' => [
990 1120 'form_custom_radio_checkbox' => 'yes',
@@ -994,11 +1124,11 @@
994 1124
995 1125 $this->add_control(
996 1126 'form_checkbox_border_color',
997 1127 [
998 - 'label' => __('Border Color', 'fluentform'),
999 - 'type' => Controls_Manager::COLOR,
1000 - 'default' => '',
1128 + 'label' => __('Border Color', 'fluentform'),
1129 + 'type' => Controls_Manager::COLOR,
1130 + 'default' => '',
1001 1131 'selectors' => [
1002 1132 '{{WRAPPER}} .fluentform-widget-custom-radio-checkbox input[type="checkbox"]:after, {{WRAPPER}} .fluentform-widget-custom-radio-checkbox input[type="radio"]:after' => 'border-color: {{VALUE}}',
1003 1133 ],
1004 1134 'condition' => [
@@ -1009,10 +1139,10 @@
1009 1139
1010 1140 $this->add_control(
1011 1141 'form_checkbox_heading',
1012 1142 [
1013 - 'label' => __('Checkbox', 'fluentform'),
1014 - 'type' => Controls_Manager::HEADING,
1143 + 'label' => __('Checkbox', 'fluentform'),
1144 + 'type' => Controls_Manager::HEADING,
1015 1145 'condition' => [
1016 1146 'form_custom_radio_checkbox' => 'yes',
1017 1147 ],
1018 1148 ]
@@ -1020,12 +1150,12 @@
1020 1150
1021 1151 $this->add_control(
1022 1152 'form_checkbox_border_radius',
1023 1153 [
1024 - 'label' => __('Border Radius', 'fluentform'),
1025 - 'type' => Controls_Manager::DIMENSIONS,
1154 + 'label' => __('Border Radius', 'fluentform'),
1155 + 'type' => Controls_Manager::DIMENSIONS,
1026 1156 'size_units' => ['px', 'em', '%'],
1027 - 'selectors' => [
1157 + 'selectors' => [
1028 1158 '{{WRAPPER}} .fluentform-widget-custom-radio-checkbox input[type="checkbox"]:after, {{WRAPPER}} .fluentform-widget-custom-radio-checkbox input[type="radio"]:after' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1029 1159 ],
1030 1160 'condition' => [
1031 1161 'form_custom_radio_checkbox' => 'yes',
@@ -1035,10 +1165,10 @@
1035 1165
1036 1166 $this->add_control(
1037 1167 'form_radio_heading',
1038 1168 [
1039 - 'label' => __('Radio Buttons', 'fluentform'),
1040 - 'type' => Controls_Manager::HEADING,
1169 + 'label' => __('Radio Buttons', 'fluentform'),
1170 + 'type' => Controls_Manager::HEADING,
1041 1171 'condition' => [
1042 1172 'form_custom_radio_checkbox' => 'yes',
1043 1173 ],
1044 1174 ]
@@ -1046,12 +1176,12 @@
1046 1176
1047 1177 $this->add_control(
1048 1178 'form_radio_border_radius',
1049 1179 [
1050 - 'label' => __('Border Radius', 'fluentform'),
1051 - 'type' => Controls_Manager::DIMENSIONS,
1180 + 'label' => __('Border Radius', 'fluentform'),
1181 + 'type' => Controls_Manager::DIMENSIONS,
1052 1182 'size_units' => ['px', 'em', '%'],
1053 - 'selectors' => [
1183 + 'selectors' => [
1054 1184 '{{WRAPPER}} .fluentform-widget-custom-radio-checkbox input[type="radio"]:after, {{WRAPPER}} .fluentform-widget-custom-radio-checkbox input[type="radio"]:after' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1055 1185 ],
1056 1186 'condition' => [
1057 1187 'form_custom_radio_checkbox' => 'yes',
@@ -1063,9 +1193,9 @@
1063 1193
1064 1194 $this->start_controls_tab(
1065 1195 'form_radio_checkbox_checked',
1066 1196 [
1067 - 'label' => __('Checked', 'fluentform'),
1197 + 'label' => __('Checked', 'fluentform'),
1068 1198 'condition' => [
1069 1199 'form_custom_radio_checkbox' => 'yes',
1070 1200 ],
1071 1201 ]
@@ -1073,11 +1203,11 @@
1073 1203
1074 1204 $this->add_control(
1075 1205 'form_radio_checkbox_bg_color_checked',
1076 1206 [
1077 - 'label' => __('Background Color', 'fluentform'),
1078 - 'type' => Controls_Manager::COLOR,
1079 - 'default' => '',
1207 + 'label' => __('Background Color', 'fluentform'),
1208 + 'type' => Controls_Manager::COLOR,
1209 + 'default' => '',
1080 1210 'selectors' => [
1081 1211 '{{WRAPPER}} .fluentform-widget-custom-radio-checkbox input[type="checkbox"]:checked:after, {{WRAPPER}} .fluentform-widget-custom-radio-checkbox input[type="radio"]:checked:after' => 'background-color: {{VALUE}}',
1082 1212 ],
1083 1213 'condition' => [
@@ -1088,11 +1218,11 @@
1088 1218
1089 1219 $this->add_control(
1090 1220 'form_radio_checkbox_border_checked',
1091 1221 [
1092 - 'label' => __('Border Color', 'fluentform'),
1093 - 'type' => Controls_Manager::COLOR,
1094 - 'default' => '',
1222 + 'label' => __('Border Color', 'fluentform'),
1223 + 'type' => Controls_Manager::COLOR,
1224 + 'default' => '',
1095 1225 'selectors' => [
1096 1226 '{{WRAPPER}} .fluentform-widget-custom-radio-checkbox input[type="checkbox"]:checked:after, {{WRAPPER}} .fluentform-widget-custom-radio-checkbox input[type="radio"]:checked:after' => 'border-color: {{VALUE}}',
1097 1227 ],
1098 1228 'condition' => [
@@ -1107,14 +1237,15 @@
1107 1237
1108 1238 $this->end_controls_section();
1109 1239 }
1110 1240
1111 - protected function register_section_break_style_controls(){
1241 + protected function register_section_break_style_controls()
1242 + {
1112 1243 $this->start_controls_section(
1113 1244 'form_section_break_style',
1114 1245 [
1115 1246 'label' => __('Section Break', 'fluentform'),
1116 - 'tab' => Controls_Manager::TAB_STYLE,
1247 + 'tab' => Controls_Manager::TAB_STYLE,
1117 1248 ]
1118 1249 );
1119 1250
1120 1251 $this->add_control(
@@ -1120,9 +1251,9 @@
1120 1251 $this->add_control(
1121 1252 'form_section_break_label',
1122 1253 [
1123 1254 'label' => __('Label', 'fluentform'),
1124 - 'type' => Controls_Manager::HEADING
1255 + 'type' => Controls_Manager::HEADING,
1125 1256 ]
1126 1257 );
1127 1258
1128 1259 $this->add_control(
@@ -1127,11 +1258,11 @@
1127 1258
1128 1259 $this->add_control(
1129 1260 'form_section_break_label_color',
1130 1261 [
1131 - 'label' => __('Color', 'fluentform'),
1132 - 'type' => Controls_Manager::COLOR,
1133 - 'default' => '',
1262 + 'label' => __('Color', 'fluentform'),
1263 + 'type' => Controls_Manager::COLOR,
1264 + 'default' => '',
1134 1265 'selectors' => [
1135 1266 '{{WRAPPER}} .fluentform-widget-wrapper .ff-el-section-break .ff-el-section-title' => 'color: {{VALUE}};',
1136 1267 ],
1137 1268 ]
@@ -1139,11 +1270,11 @@
1139 1270
1140 1271 $this->add_group_control(
1141 1272 Group_Control_Typography::get_type(),
1142 1273 [
1143 - 'name' => 'form_section_break_label_typography',
1144 - 'label' => __('Typography', 'fluentform'),
1145 - 'selector' => '.fluentform-widget-wrapper .ff-el-section-break .ff-el-section-title',
1274 + 'name' => 'form_section_break_label_typography',
1275 + 'label' => __('Typography', 'fluentform'),
1276 + 'selector' => '.fluentform-widget-wrapper .ff-el-section-break .ff-el-section-title',
1146 1277 'separator' => 'before',
1147 1278 ]
1148 1279 );
1149 1280
@@ -1149,12 +1280,12 @@
1149 1280
1150 1281 $this->add_responsive_control(
1151 1282 'form_section_break_label_padding',
1152 1283 [
1153 - 'label' => __('Padding', 'fluentform'),
1154 - 'type' => Controls_Manager::DIMENSIONS,
1284 + 'label' => __('Padding', 'fluentform'),
1285 + 'type' => Controls_Manager::DIMENSIONS,
1155 1286 'size_units' => ['px', 'em', '%'],
1156 - 'selectors' => [
1287 + 'selectors' => [
1157 1288 '{{WRAPPER}} .fluentform-widget-wrapper .ff-el-section-break .ff-el-section-title' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1158 1289 ],
1159 1290 ]
1160 1291 );
@@ -1161,12 +1292,12 @@
1161 1292
1162 1293 $this->add_responsive_control(
1163 1294 'form_section_break_label_margin',
1164 1295 [
1165 - 'label' => __('Margin', 'fluentform'),
1166 - 'type' => Controls_Manager::DIMENSIONS,
1296 + 'label' => __('Margin', 'fluentform'),
1297 + 'type' => Controls_Manager::DIMENSIONS,
1167 1298 'size_units' => ['px', 'em', '%'],
1168 - 'selectors' => [
1299 + 'selectors' => [
1169 1300 '{{WRAPPER}} .fluentform-widget-wrapper .ff-el-section-break .ff-el-section-title' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1170 1301 ],
1171 1302 ]
1172 1303 );
@@ -1173,11 +1304,11 @@
1173 1304
1174 1305 $this->add_control(
1175 1306 'form_section_break_description',
1176 1307 [
1177 - 'label' => __('Description', 'fluentform'),
1178 - 'type' => Controls_Manager::HEADING,
1179 - 'separator' => 'before'
1308 + 'label' => __('Description', 'fluentform'),
1309 + 'type' => Controls_Manager::HEADING,
1310 + 'separator' => 'before',
1180 1311 ]
1181 1312 );
1182 1313
1183 1314 $this->add_control(
@@ -1182,11 +1313,11 @@
1182 1313
1183 1314 $this->add_control(
1184 1315 'form_section_break_description_color',
1185 1316 [
1186 - 'label' => __('Color', 'fluentform'),
1187 - 'type' => Controls_Manager::COLOR,
1188 - 'default' => '',
1317 + 'label' => __('Color', 'fluentform'),
1318 + 'type' => Controls_Manager::COLOR,
1319 + 'default' => '',
1189 1320 'selectors' => [
1190 1321 '{{WRAPPER}} .fluentform-widget-wrapper .ff-el-section-break .ff-section_break_desk' => 'color: {{VALUE}};',
1191 1322 ],
1192 1323 ]
@@ -1194,11 +1325,11 @@
1194 1325
1195 1326 $this->add_group_control(
1196 1327 Group_Control_Typography::get_type(),
1197 1328 [
1198 - 'name' => 'form_section_break_description_typography',
1199 - 'label' => __('Typography', 'fluentform'),
1200 - 'selector' => '{{WRAPPER}} .fluentform-widget-wrapper .ff-el-section-break div',
1329 + 'name' => 'form_section_break_description_typography',
1330 + 'label' => __('Typography', 'fluentform'),
1331 + 'selector' => '{{WRAPPER}} .fluentform-widget-wrapper .ff-el-section-break div',
1201 1332 'separator' => 'before',
1202 1333 ]
1203 1334 );
1204 1335
@@ -1204,12 +1335,12 @@
1204 1335
1205 1336 $this->add_responsive_control(
1206 1337 'form_section_break_description_padding',
1207 1338 [
1208 - 'label' => __('Padding', 'fluentform'),
1209 - 'type' => Controls_Manager::DIMENSIONS,
1339 + 'label' => __('Padding', 'fluentform'),
1340 + 'type' => Controls_Manager::DIMENSIONS,
1210 1341 'size_units' => ['px', 'em', '%'],
1211 - 'selectors' => [
1342 + 'selectors' => [
1212 1343 '{{WRAPPER}} .fluentform-widget-wrapper .ff-el-section-break .ff-section_break_desk' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1213 1344 ],
1214 1345 ]
1215 1346 );
@@ -1216,12 +1347,12 @@
1216 1347
1217 1348 $this->add_responsive_control(
1218 1349 'form_section_break_description_margin',
1219 1350 [
1220 - 'label' => __('Margin', 'fluentform'),
1221 - 'type' => Controls_Manager::DIMENSIONS,
1351 + 'label' => __('Margin', 'fluentform'),
1352 + 'type' => Controls_Manager::DIMENSIONS,
1222 1353 'size_units' => ['px', 'em', '%'],
1223 - 'selectors' => [
1354 + 'selectors' => [
1224 1355 '{{WRAPPER}} .fluentform-widget-wrapper .ff-el-section-break .ff-section_break_desk' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1225 1356 ],
1226 1357 ]
1227 1358 );
@@ -1228,25 +1359,25 @@
1228 1359
1229 1360 $this->add_responsive_control(
1230 1361 'form_section_break_alignment',
1231 1362 [
1232 - 'label' => __('Alignment', 'fluentform'),
1233 - 'type' => Controls_Manager::CHOOSE,
1363 + 'label' => __('Alignment', 'fluentform'),
1364 + 'type' => Controls_Manager::CHOOSE,
1234 1365 'options' => [
1235 1366 'left' => [
1236 1367 'title' => __('Left', 'fluentform'),
1237 - 'icon' => 'eicon-h-align-left',
1368 + 'icon' => 'eicon-h-align-left',
1238 1369 ],
1239 1370 'center' => [
1240 1371 'title' => __('Center', 'fluentform'),
1241 - 'icon' => 'eicon-h-align-center',
1372 + 'icon' => 'eicon-h-align-center',
1242 1373 ],
1243 1374 'right' => [
1244 1375 'title' => __('Right', 'fluentform'),
1245 - 'icon' => 'eicon-h-align-right',
1376 + 'icon' => 'eicon-h-align-right',
1246 1377 ],
1247 1378 ],
1248 - 'prefix_class' => 'fluentform-widget-section-break-content-'
1379 + 'prefix_class' => 'fluentform-widget-section-break-content-',
1249 1380 ]
1250 1381 );
1251 1382
1252 1383 $this->end_controls_section();
@@ -1251,15 +1382,15 @@
1251 1382
1252 1383 $this->end_controls_section();
1253 1384 }
1254 1385
1255 - protected function register_checkbox_grid_style_controls(){
1256 -
1386 + protected function register_checkbox_grid_style_controls()
1387 + {
1257 1388 $this->start_controls_section(
1258 1389 'section_form_checkbox_grid',
1259 1390 [
1260 1391 'label' => __('Checkbox Grid', 'fluentform'),
1261 - 'tab' => Controls_Manager::TAB_STYLE,
1392 + 'tab' => Controls_Manager::TAB_STYLE,
1262 1393 ]
1263 1394 );
1264 1395
1265 1396 $this->add_control(
@@ -1264,11 +1395,11 @@
1264 1395
1265 1396 $this->add_control(
1266 1397 'section_form_checkbox_grid_head',
1267 1398 [
1268 - 'label' => __('Grid Table Head', 'fluentform'),
1269 - 'type' => Controls_Manager::HEADING,
1270 - 'separator' => 'before'
1399 + 'label' => __('Grid Table Head', 'fluentform'),
1400 + 'type' => Controls_Manager::HEADING,
1401 + 'separator' => 'before',
1271 1402 ]
1272 1403 );
1273 1404
1274 1405 $this->add_control(
@@ -1273,11 +1404,11 @@
1273 1404
1274 1405 $this->add_control(
1275 1406 'form_checkbox_grid_table_head_text_color',
1276 1407 [
1277 - 'label' => __('Color', 'fluentform'),
1278 - 'type' => Controls_Manager::COLOR,
1279 - 'default' => '',
1408 + 'label' => __('Color', 'fluentform'),
1409 + 'type' => Controls_Manager::COLOR,
1410 + 'default' => '',
1280 1411 'selectors' => [
1281 1412 '{{WRAPPER}} .fluentform-widget-wrapper .ff-table thead th' => 'color: {{VALUE}};',
1282 1413 ],
1283 1414 ]
@@ -1285,11 +1416,11 @@
1285 1416
1286 1417 $this->add_control(
1287 1418 'form_checkbox_grid_table_head_color',
1288 1419 [
1289 - 'label' => __('Background Color', 'fluentform'),
1290 - 'type' => Controls_Manager::COLOR,
1291 - 'default' => '',
1420 + 'label' => __('Background Color', 'fluentform'),
1421 + 'type' => Controls_Manager::COLOR,
1422 + 'default' => '',
1292 1423 'selectors' => [
1293 1424 '{{WRAPPER}} .fluentform-widget-wrapper .ff-table thead th' => 'background-color: {{VALUE}};',
1294 1425 ],
1295 1426 ]
@@ -1297,11 +1428,11 @@
1297 1428
1298 1429 $this->add_group_control(
1299 1430 Group_Control_Typography::get_type(),
1300 1431 [
1301 - 'name' => 'form_checkbox_grid_table_head_typography',
1302 - 'label' => __('Typography', 'fluentform'),
1303 - 'selector' => '{{WRAPPER}} .fluentform-widget-wrapper .ff-table thead th',
1432 + 'name' => 'form_checkbox_grid_table_head_typography',
1433 + 'label' => __('Typography', 'fluentform'),
1434 + 'selector' => '{{WRAPPER}} .fluentform-widget-wrapper .ff-table thead th',
1304 1435 'separator' => 'before',
1305 1436 ]
1306 1437 );
1307 1438
@@ -1308,20 +1439,20 @@
1308 1439 $this->add_responsive_control(
1309 1440 'form_checkbox_grid_table_head_height',
1310 1441 [
1311 1442 'label' => __('Height', 'fluentform'),
1312 - 'type' => Controls_Manager::SLIDER,
1443 + 'type' => Controls_Manager::SLIDER,
1313 1444 'range' => [
1314 1445 'px' => [
1315 - 'min' => 0,
1316 - 'max' => 1200,
1446 + 'min' => 0,
1447 + 'max' => 1200,
1317 1448 'step' => 1,
1318 1449 ],
1319 1450 ],
1320 1451 'size_units' => ['px', '%'],
1321 - 'selectors' => [
1452 + 'selectors' => [
1322 1453 '{{WRAPPER}} .fluentform-widget-wrapper .ff-table thead th' => 'height: {{SIZE}}{{UNIT}}',
1323 - ]
1454 + ],
1324 1455 ]
1325 1456 );
1326 1457
1327 1458 $this->add_group_control(
@@ -1326,11 +1457,11 @@
1326 1457
1327 1458 $this->add_group_control(
1328 1459 Group_Control_Border::get_type(),
1329 1460 [
1330 - 'name' => 'form_checkbox_grid_table_head_border',
1331 - 'label' => __('Border', 'fluentform'),
1332 - 'default' => '',
1461 + 'name' => 'form_checkbox_grid_table_head_border',
1462 + 'label' => __('Border', 'fluentform'),
1463 + 'default' => '',
1333 1464 'selector' => '{{WRAPPER}} .fluentform-widget-wrapper .ff-table thead tr',
1334 1465 ]
1335 1466 );
1336 1467
@@ -1336,12 +1467,12 @@
1336 1467
1337 1468 $this->add_responsive_control(
1338 1469 'form_checkbox_grid_table_head_padding',
1339 1470 [
1340 - 'label' => __('Padding', 'fluentform'),
1341 - 'type' => Controls_Manager::DIMENSIONS,
1471 + 'label' => __('Padding', 'fluentform'),
1472 + 'type' => Controls_Manager::DIMENSIONS,
1342 1473 'size_units' => ['px', 'em', '%'],
1343 - 'selectors' => [
1474 + 'selectors' => [
1344 1475 '{{WRAPPER}} .fluentform-widget-wrapper .ff-table thead th' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1345 1476 ],
1346 1477 ]
1347 1478 );
@@ -1348,11 +1479,11 @@
1348 1479
1349 1480 $this->add_control(
1350 1481 'form_checkbox_grid_table_item',
1351 1482 [
1352 - 'label' => __('Grid Table Item', 'fluentform'),
1353 - 'type' => Controls_Manager::HEADING,
1354 - 'separator' => 'before'
1483 + 'label' => __('Grid Table Item', 'fluentform'),
1484 + 'type' => Controls_Manager::HEADING,
1485 + 'separator' => 'before',
1355 1486 ]
1356 1487 );
1357 1488
1358 1489 $this->add_control(
@@ -1357,11 +1488,11 @@
1357 1488
1358 1489 $this->add_control(
1359 1490 'form_checkbox_grid_table_item_color',
1360 1491 [
1361 - 'label' => __('Color', 'fluentform'),
1362 - 'type' => Controls_Manager::COLOR,
1363 - 'default' => '',
1492 + 'label' => __('Color', 'fluentform'),
1493 + 'type' => Controls_Manager::COLOR,
1494 + 'default' => '',
1364 1495 'selectors' => [
1365 1496 '{{WRAPPER}} .fluentform-widget-wrapper .ff-table tbody tr td' => 'color: {{VALUE}} !important;',
1366 1497 ],
1367 1498 ]
@@ -1369,11 +1500,11 @@
1369 1500
1370 1501 $this->add_control(
1371 1502 'form_checkbox_grid_table_item_bg_color',
1372 1503 [
1373 - 'label' => __('Background Color', 'fluentform'),
1374 - 'type' => Controls_Manager::COLOR,
1375 - 'default' => '',
1504 + 'label' => __('Background Color', 'fluentform'),
1505 + 'type' => Controls_Manager::COLOR,
1506 + 'default' => '',
1376 1507 'selectors' => [
1377 1508 '{{WRAPPER}} .fluentform-widget-wrapper .ff-table tbody tr td' => 'background-color: {{VALUE}};',
1378 1509 ],
1379 1510 ]
@@ -1381,11 +1512,11 @@
1381 1512
1382 1513 $this->add_control(
1383 1514 'form_checkbox_grid_table_item_odd_bg_color',
1384 1515 [
1385 - 'label' => __('Odd Item Background Color', 'fluentform'),
1386 - 'type' => Controls_Manager::COLOR,
1387 - 'default' => '',
1516 + 'label' => __('Odd Item Background Color', 'fluentform'),
1517 + 'type' => Controls_Manager::COLOR,
1518 + 'default' => '',
1388 1519 'selectors' => [
1389 1520 '{{WRAPPER}} .fluentform-widget-wrapper tbody>tr:nth-child(2n)>td' => 'background-color: {{VALUE}} !important;',
1390 1521 ],
1391 1522 ]
@@ -1393,10 +1524,10 @@
1393 1524
1394 1525 $this->add_group_control(
1395 1526 Group_Control_Typography::get_type(),
1396 1527 [
1397 - 'name' => 'form_checkbox_grid_table_item_typography',
1398 - 'label' => __('Typography', 'fluentform'),
1528 + 'name' => 'form_checkbox_grid_table_item_typography',
1529 + 'label' => __('Typography', 'fluentform'),
1399 1530 'selector' => '{{WRAPPER}} .fluentform-widget-wrapper .ff-table tbody tr td',
1400 1531 ]
1401 1532 );
1402 1533
@@ -1403,20 +1534,20 @@
1403 1534 $this->add_responsive_control(
1404 1535 'form_checkbox_grid_table_item_height',
1405 1536 [
1406 1537 'label' => __('Height', 'fluentform'),
1407 - 'type' => Controls_Manager::SLIDER,
1538 + 'type' => Controls_Manager::SLIDER,
1408 1539 'range' => [
1409 1540 'px' => [
1410 - 'min' => 0,
1411 - 'max' => 1200,
1541 + 'min' => 0,
1542 + 'max' => 1200,
1412 1543 'step' => 1,
1413 1544 ],
1414 1545 ],
1415 1546 'size_units' => ['px', '%'],
1416 - 'selectors' => [
1547 + 'selectors' => [
1417 1548 '{{WRAPPER}} .fluentform-widget-wrapper .ff-table tbody tr td' => 'height: {{SIZE}}{{UNIT}}',
1418 - ]
1549 + ],
1419 1550 ]
1420 1551 );
1421 1552
1422 1553 $this->add_group_control(
@@ -1421,11 +1552,11 @@
1421 1552
1422 1553 $this->add_group_control(
1423 1554 Group_Control_Border::get_type(),
1424 1555 [
1425 - 'name' => 'form_checkbox_grid_table_item_border',
1426 - 'label' => __('Border', 'fluentform'),
1427 - 'default' => '',
1556 + 'name' => 'form_checkbox_grid_table_item_border',
1557 + 'label' => __('Border', 'fluentform'),
1558 + 'default' => '',
1428 1559 'selector' => '{{WRAPPER}} .fluentform-widget-wrapper .ff-table tbody tr',
1429 1560 ]
1430 1561 );
1431 1562
@@ -1431,12 +1562,12 @@
1431 1562
1432 1563 $this->add_responsive_control(
1433 1564 'form_checkbox_grid_table_item_padding',
1434 1565 [
1435 - 'label' => __('Padding', 'fluentform'),
1436 - 'type' => Controls_Manager::DIMENSIONS,
1566 + 'label' => __('Padding', 'fluentform'),
1567 + 'type' => Controls_Manager::DIMENSIONS,
1437 1568 'size_units' => ['px', 'em', '%'],
1438 - 'selectors' => [
1569 + 'selectors' => [
1439 1570 '{{WRAPPER}} .fluentform-widget-wrapper .ff-table tbody tr td' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1440 1571 ],
1441 1572 ]
1442 1573 );
@@ -1443,14 +1574,15 @@
1443 1574
1444 1575 $this->end_controls_section();
1445 1576 }
1446 1577
1447 - protected function register_address_line_style_controls(){
1578 + protected function register_address_line_style_controls()
1579 + {
1448 1580 $this->start_controls_section(
1449 1581 'section_form_address_line_style',
1450 1582 [
1451 1583 'label' => __('Address Line', 'fluentform'),
1452 - 'tab' => Controls_Manager::TAB_STYLE,
1584 + 'tab' => Controls_Manager::TAB_STYLE,
1453 1585 ]
1454 1586 );
1455 1587
1456 1588 $this->add_control(
@@ -1455,11 +1587,11 @@
1455 1587
1456 1588 $this->add_control(
1457 1589 'address_line_label_color',
1458 1590 [
1459 - 'label' => __('Label Color', 'fluentform'),
1460 - 'type' => Controls_Manager::COLOR,
1461 - 'default' => '',
1591 + 'label' => __('Label Color', 'fluentform'),
1592 + 'type' => Controls_Manager::COLOR,
1593 + 'default' => '',
1462 1594 'selectors' => [
1463 1595 '{{WRAPPER}} .fluentform-widget-wrapper .fluent-address label' => 'color: {{VALUE}};',
1464 1596 ],
1465 1597 ]
@@ -1467,10 +1599,10 @@
1467 1599
1468 1600 $this->add_group_control(
1469 1601 Group_Control_Typography::get_type(),
1470 1602 [
1471 - 'name' => 'address_line_label_typography',
1472 - 'label' => __('Typography', 'fluentform'),
1603 + 'name' => 'address_line_label_typography',
1604 + 'label' => __('Typography', 'fluentform'),
1473 1605 'selector' => '{{WRAPPER}} .fluentform-widget-wrapper .fluent-address label',
1474 1606 ]
1475 1607 );
1476 1608
@@ -1476,14 +1608,15 @@
1476 1608
1477 1609 $this->end_controls_section();
1478 1610 }
1479 1611
1480 - protected function register_image_upload_style_controls(){
1612 + protected function register_image_upload_style_controls()
1613 + {
1481 1614 $this->start_controls_section(
1482 1615 'section_form_image_upload_style',
1483 1616 [
1484 1617 'label' => __('Image Upload', 'fluentform'),
1485 - 'tab' => Controls_Manager::TAB_STYLE,
1618 + 'tab' => Controls_Manager::TAB_STYLE,
1486 1619 ]
1487 1620 );
1488 1621
1489 1622 $this->start_controls_tabs('tabs_form_image_upload_button_style');
@@ -1497,11 +1630,11 @@
1497 1630
1498 1631 $this->add_control(
1499 1632 'form_image_upload_bg_color',
1500 1633 [
1501 - 'label' => __('Background Color', 'fluentform'),
1502 - 'type' => Controls_Manager::COLOR,
1503 - 'default' => '',
1634 + 'label' => __('Background Color', 'fluentform'),
1635 + 'type' => Controls_Manager::COLOR,
1636 + 'default' => '',
1504 1637 'selectors' => [
1505 1638 '{{WRAPPER}} .fluentform-widget-wrapper .ff_upload_btn.ff-btn' => 'background-color: {{VALUE}};',
1506 1639 ],
1507 1640 ]
@@ -1509,11 +1642,11 @@
1509 1642
1510 1643 $this->add_group_control(
1511 1644 Group_Control_Border::get_type(),
1512 1645 [
1513 - 'name' => 'form_image_upload_button_border_normal',
1514 - 'label' => __('Border', 'fluentform'),
1515 - 'default' => '',
1646 + 'name' => 'form_image_upload_button_border_normal',
1647 + 'label' => __('Border', 'fluentform'),
1648 + 'default' => '',
1516 1649 'selector' => '{{WRAPPER}} .fluentform-widget-wrapper .ff_upload_btn.ff-btn',
1517 1650 ]
1518 1651 );
1519 1652
@@ -1519,12 +1652,12 @@
1519 1652
1520 1653 $this->add_control(
1521 1654 'form_image_upload_button_border_radius',
1522 1655 [
1523 - 'label' => __('Border Radius', 'fluentform'),
1524 - 'type' => Controls_Manager::DIMENSIONS,
1656 + 'label' => __('Border Radius', 'fluentform'),
1657 + 'type' => Controls_Manager::DIMENSIONS,
1525 1658 'size_units' => ['px', 'em', '%'],
1526 - 'selectors' => [
1659 + 'selectors' => [
1527 1660 '{{WRAPPER}} .fluentform-widget-wrapper .ff_upload_btn.ff-btn' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1528 1661 ],
1529 1662 ]
1530 1663 );
@@ -1531,12 +1664,12 @@
1531 1664
1532 1665 $this->add_responsive_control(
1533 1666 'form_image_upload_button_padding',
1534 1667 [
1535 - 'label' => __('Padding', 'fluentform'),
1536 - 'type' => Controls_Manager::DIMENSIONS,
1668 + 'label' => __('Padding', 'fluentform'),
1669 + 'type' => Controls_Manager::DIMENSIONS,
1537 1670 'size_units' => ['px', 'em', '%'],
1538 - 'selectors' => [
1671 + 'selectors' => [
1539 1672 '{{WRAPPER}} .fluentform-widget-wrapper .ff_upload_btn.ff-btn' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1540 1673 ],
1541 1674 ]
1542 1675 );
@@ -1543,10 +1676,10 @@
1543 1676
1544 1677 $this->add_group_control(
1545 1678 Group_Control_Typography::get_type(),
1546 1679 [
1547 - 'name' => 'form_image_upload_typography',
1548 - 'label' => __('Typography', 'fluentform'),
1680 + 'name' => 'form_image_upload_typography',
1681 + 'label' => __('Typography', 'fluentform'),
1549 1682 'selector' => '{{WRAPPER}} .fluentform-widget-wrapper .ff_upload_btn.ff-btn',
1550 1683 ]
1551 1684 );
1552 1685
@@ -1552,9 +1685,9 @@
1552 1685
1553 1686 $this->add_group_control(
1554 1687 Group_Control_Box_Shadow::get_type(),
1555 1688 [
1556 - 'name' => 'form_image_upload_button_box_shadow',
1689 + 'name' => 'form_image_upload_button_box_shadow',
1557 1690 'selector' => '{{WRAPPER}} .fluentform-widget-wrapper .ff_upload_btn.ff-btn',
1558 1691 ]
1559 1692 );
1560 1693
@@ -1569,11 +1702,11 @@
1569 1702
1570 1703 $this->add_control(
1571 1704 'form_image_upload_button_bg_color_hover',
1572 1705 [
1573 - 'label' => __('Background Color', 'fluentform'),
1574 - 'type' => Controls_Manager::COLOR,
1575 - 'default' => '',
1706 + 'label' => __('Background Color', 'fluentform'),
1707 + 'type' => Controls_Manager::COLOR,
1708 + 'default' => '',
1576 1709 'selectors' => [
1577 1710 '{{WRAPPER}} .fluentform-widget-wrapper .ff_upload_btn.ff-btn:hover' => 'background-color: {{VALUE}} !important;',
1578 1711 ],
1579 1712 ]
@@ -1581,11 +1714,11 @@
1581 1714
1582 1715 $this->add_control(
1583 1716 'form_image_upload_button_text_color_hover',
1584 1717 [
1585 - 'label' => __('Text Color', 'fluentform'),
1586 - 'type' => Controls_Manager::COLOR,
1587 - 'default' => '',
1718 + 'label' => __('Text Color', 'fluentform'),
1719 + 'type' => Controls_Manager::COLOR,
1720 + 'default' => '',
1588 1721 'selectors' => [
1589 1722 '{{WRAPPER}} .fluentform-widget-wrapper .ff_upload_btn.ff-btn:hover' => 'color: {{VALUE}} !important;',
1590 1723 ],
1591 1724 ]
@@ -1593,11 +1726,11 @@
1593 1726
1594 1727 $this->add_control(
1595 1728 'form_image_upload_button_border_color_hover',
1596 1729 [
1597 - 'label' => __('Border Color', 'fluentform'),
1598 - 'type' => Controls_Manager::COLOR,
1599 - 'default' => '',
1730 + 'label' => __('Border Color', 'fluentform'),
1731 + 'type' => Controls_Manager::COLOR,
1732 + 'default' => '',
1600 1733 'selectors' => [
1601 1734 '{{WRAPPER}} .fluentform-widget-wrapper .ff_upload_btn.ff-btn:hover' => 'border-color: {{VALUE}}',
1602 1735 ],
1603 1736 ]
@@ -1608,16 +1741,16 @@
1608 1741 $this->end_controls_tabs();
1609 1742 $this->end_controls_section();
1610 1743 }
1611 1744
1612 - protected function register_pagination_style_controls(){
1613 - if( defined("FLUENTFORMPRO") ) {
1614 -
1745 + protected function register_pagination_style_controls()
1746 + {
1747 + if (defined('FLUENTFORMPRO')) {
1615 1748 $this->start_controls_section(
1616 1749 'section_form_pagination_style',
1617 1750 [
1618 1751 'label' => __('Pagination', 'fluentform'),
1619 - 'tab' => Controls_Manager::TAB_STYLE,
1752 + 'tab' => Controls_Manager::TAB_STYLE,
1620 1753 ]
1621 1754 );
1622 1755
1623 1756 $this->add_control(
@@ -1623,9 +1756,9 @@
1623 1756 $this->add_control(
1624 1757 'form_pagination_progressbar_label',
1625 1758 [
1626 1759 'label' => __('Progressbar Label', 'fluentform'),
1627 - 'type' => Controls_Manager::HEADING
1760 + 'type' => Controls_Manager::HEADING,
1628 1761 ]
1629 1762 );
1630 1763
1631 1764 $this->add_control(
@@ -1630,15 +1763,15 @@
1630 1763
1631 1764 $this->add_control(
1632 1765 'show_label',
1633 1766 [
1634 - 'label' => __( 'Show Label', 'fluentform' ),
1635 - 'type' => Controls_Manager::SWITCHER,
1636 - 'label_on' => __( 'Show', 'fluentform' ),
1637 - 'label_off' => __( 'Hide', 'fluentform' ),
1767 + 'label' => __('Show Label', 'fluentform'),
1768 + 'type' => Controls_Manager::SWITCHER,
1769 + 'label_on' => __('Show', 'fluentform'),
1770 + 'label_off' => __('Hide', 'fluentform'),
1638 1771 'return_value' => 'yes',
1639 - 'default' => 'yes',
1640 - 'prefix_class' => 'fluent-form-widget-step-header-'
1772 + 'default' => 'yes',
1773 + 'prefix_class' => 'fluent-form-widget-step-header-',
1641 1774 ]
1642 1775 );
1643 1776
1644 1777 $this->add_control(
@@ -1643,20 +1776,19 @@
1643 1776
1644 1777 $this->add_control(
1645 1778 'form_progressbar_label_color',
1646 1779 [
1647 - 'label' => __( 'Label Color', 'fluentform' ),
1648 - 'type' => Controls_Manager::COLOR,
1649 - 'scheme' => [
1650 - 'type' => Scheme_Color::get_type(),
1651 - 'value' => Scheme_Color::COLOR_1,
1652 - ],
1780 + 'label' => __('Label Color', 'fluentform'),
1781 + 'type' => Controls_Manager::COLOR,
1653 1782 'selectors' => [
1654 1783 '{{WRAPPER}} .ff-el-progress-status' => 'color: {{VALUE}}',
1655 1784 ],
1785 + 'global' => [
1786 + 'default' => Global_Colors::COLOR_PRIMARY,
1787 + ],
1656 1788 'condition' => [
1657 - 'show_label' => 'yes'
1658 - ]
1789 + 'show_label' => 'yes',
1790 + ],
1659 1791 ]
1660 1792 );
1661 1793
1662 1794 $this->add_group_control(
@@ -1661,15 +1793,17 @@
1661 1793
1662 1794 $this->add_group_control(
1663 1795 Group_Control_Typography::get_type(),
1664 1796 [
1665 - 'name' => 'form_progressbar_label_typography',
1666 - 'label' => __( 'Typography', 'fluentform' ),
1667 - 'scheme' => Scheme_Typography::TYPOGRAPHY_1,
1668 - 'selector' => '{{WRAPPER}} .ff-el-progress-status',
1797 + 'name' => 'form_progressbar_label_typography',
1798 + 'label' => __('Typography', 'fluentform'),
1799 + 'selector' => '{{WRAPPER}} .ff-el-progress-status',
1800 + 'global' => [
1801 + 'default' => Global_Typography::TYPOGRAPHY_PRIMARY
1802 + ],
1669 1803 'condition' => [
1670 - 'show_label' => 'yes'
1671 - ]
1804 + 'show_label' => 'yes',
1805 + ],
1672 1806 ]
1673 1807 );
1674 1808
1675 1809 $this->add_control(
@@ -1674,18 +1808,18 @@
1674 1808
1675 1809 $this->add_control(
1676 1810 'form_progressbar_label_space',
1677 1811 [
1678 - 'label' => __( 'Spacing', 'fluentform' ),
1679 - 'type' => Controls_Manager::DIMENSIONS,
1680 - 'size_units' => [ 'px', '%', 'em' ],
1681 - 'selectors' => [
1812 + 'label' => __('Spacing', 'fluentform'),
1813 + 'type' => Controls_Manager::DIMENSIONS,
1814 + 'size_units' => ['px', '%', 'em'],
1815 + 'selectors' => [
1682 1816 '{{WRAPPER}} .ff-el-progress-status' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1683 1817 ],
1684 1818 'condition' => [
1685 - 'show_label' => 'yes'
1819 + 'show_label' => 'yes',
1686 1820 ],
1687 - 'separator' => 'after'
1821 + 'separator' => 'after',
1688 1822 ]
1689 1823 );
1690 1824
1691 1825 $this->add_control(
@@ -1691,9 +1825,9 @@
1691 1825 $this->add_control(
1692 1826 'form_pagination_progressbar',
1693 1827 [
1694 1828 'label' => __('Progressbar', 'fluentform'),
1695 - 'type' => Controls_Manager::HEADING,
1829 + 'type' => Controls_Manager::HEADING,
1696 1830 ]
1697 1831 );
1698 1832
1699 1833 $this->add_control(
@@ -1698,15 +1832,15 @@
1698 1832
1699 1833 $this->add_control(
1700 1834 'show_form_progressbar',
1701 1835 [
1702 - 'label' => __( 'Show Progressbar', 'fluentform' ),
1703 - 'type' => Controls_Manager::SWITCHER,
1704 - 'label_on' => __( 'Show', 'fluentform' ),
1705 - 'label_off' => __( 'Hide', 'fluentform' ),
1836 + 'label' => __('Show Progressbar', 'fluentform'),
1837 + 'type' => Controls_Manager::SWITCHER,
1838 + 'label_on' => __('Show', 'fluentform'),
1839 + 'label_off' => __('Hide', 'fluentform'),
1706 1840 'return_value' => 'yes',
1707 - 'default' => 'yes',
1708 - 'prefix_class' => 'fluent-form-widget-step-progressbar-'
1841 + 'default' => 'yes',
1842 + 'prefix_class' => 'fluent-form-widget-step-progressbar-',
1709 1843 ]
1710 1844 );
1711 1845
1712 1846 $this->start_controls_tabs('form_progressbar_style_tabs');
@@ -1713,11 +1847,11 @@
1713 1847
1714 1848 $this->start_controls_tab(
1715 1849 'form_progressbar_normal',
1716 1850 [
1717 - 'label' => __('Normal', 'fluentform'),
1851 + 'label' => __('Normal', 'fluentform'),
1718 1852 'condition' => [
1719 - 'show_form_progressbar' => 'yes'
1853 + 'show_form_progressbar' => 'yes',
1720 1854 ],
1721 1855 ]
1722 1856 );
1723 1857
@@ -1723,18 +1857,19 @@
1723 1857
1724 1858 $this->add_group_control(
1725 1859 Group_Control_Background::get_type(),
1726 1860 [
1727 - 'name' => 'form_progressbar_bg',
1728 - 'label' => __( 'Background', 'fluentform' ),
1729 - 'types' => [ 'classic', 'gradient' ],
1730 - 'selector' => '{{WRAPPER}} .ff-el-progress',
1861 + 'name' => 'form_progressbar_bg',
1862 + 'label' => __('Background', 'fluentform'),
1863 + 'types' => ['classic', 'gradient'],
1864 + 'selector' => '{{WRAPPER}} .ff-el-progress',
1731 1865 'condition' => [
1732 - 'show_form_progressbar' => 'yes'
1866 + 'show_form_progressbar' => 'yes',
1733 1867 ],
1734 - 'exclude' => [
1735 - 'image'
1736 - ]
1868 + // phpcs:ignore WordPressVIPMinimum.Performance.WPQueryParams.PostNotIn_exclude -- Elementor widget parameter, not WP_Query
1869 + 'exclude' => [
1870 + 'image',
1871 + ],
1737 1872 ]
1738 1873 );
1739 1874
1740 1875 $this->add_control(
@@ -1739,20 +1874,19 @@
1739 1874
1740 1875 $this->add_control(
1741 1876 'form_progressbar_color',
1742 1877 [
1743 - 'label' => __( 'Text Color', 'fluentform' ),
1744 - 'type' => Controls_Manager::COLOR,
1745 - 'scheme' => [
1746 - 'type' => Scheme_Color::get_type(),
1747 - 'value' => Scheme_Color::COLOR_1,
1748 - ],
1878 + 'label' => __('Text Color', 'fluentform'),
1879 + 'type' => Controls_Manager::COLOR,
1749 1880 'selectors' => [
1750 1881 '{{WRAPPER}} .ff-el-progress-bar span' => 'color: {{VALUE}};',
1751 1882 ],
1883 + 'global' => [
1884 + 'default' => Global_Colors::COLOR_PRIMARY
1885 + ],
1752 1886 'condition' => [
1753 - 'show_form_progressbar' => 'yes'
1754 - ]
1887 + 'show_form_progressbar' => 'yes',
1888 + ],
1755 1889 ]
1756 1890 );
1757 1891
1758 1892 $this->add_control(
@@ -1757,24 +1891,24 @@
1757 1891
1758 1892 $this->add_control(
1759 1893 'form_progressbar_height',
1760 1894 [
1761 - 'label' => __( 'Height', 'fluentform' ),
1762 - 'type' => Controls_Manager::SLIDER,
1763 - 'size_units' => [ 'px' ],
1764 - 'range' => [
1895 + 'label' => __('Height', 'fluentform'),
1896 + 'type' => Controls_Manager::SLIDER,
1897 + 'size_units' => ['px'],
1898 + 'range' => [
1765 1899 'px' => [
1766 - 'min' => 0,
1767 - 'max' => 100,
1900 + 'min' => 0,
1901 + 'max' => 100,
1768 1902 'step' => 1,
1769 - ]
1903 + ],
1770 1904 ],
1771 1905 'selectors' => [
1772 1906 '{{WRAPPER}} .ff-el-progress' => 'height: {{SIZE}}{{UNIT}};',
1773 1907 ],
1774 1908 'condition' => [
1775 - 'show_form_progressbar' => 'yes'
1776 - ]
1909 + 'show_form_progressbar' => 'yes',
1910 + ],
1777 1911 ]
1778 1912 );
1779 1913
1780 1914 $this->add_group_control(
@@ -1779,14 +1913,14 @@
1779 1913
1780 1914 $this->add_group_control(
1781 1915 Group_Control_Border::get_type(),
1782 1916 [
1783 - 'name' => 'form_progressbar_border',
1784 - 'label' => __( 'Border', 'fluentform' ),
1785 - 'selector' => '{{WRAPPER}} .ff-el-progress',
1917 + 'name' => 'form_progressbar_border',
1918 + 'label' => __('Border', 'fluentform'),
1919 + 'selector' => '{{WRAPPER}} .ff-el-progress',
1786 1920 'condition' => [
1787 - 'show_form_progressbar' => 'yes'
1788 - ]
1921 + 'show_form_progressbar' => 'yes',
1922 + ],
1789 1923 ]
1790 1924 );
1791 1925
1792 1926 $this->add_control(
@@ -1791,17 +1925,17 @@
1791 1925
1792 1926 $this->add_control(
1793 1927 'form_progressbar_border_radius',
1794 1928 [
1795 - 'label' => __( 'Border Radius', 'fluentform' ),
1796 - 'type' => Controls_Manager::DIMENSIONS,
1797 - 'size_units' => [ 'px', '%', 'em' ],
1798 - 'selectors' => [
1929 + 'label' => __('Border Radius', 'fluentform'),
1930 + 'type' => Controls_Manager::DIMENSIONS,
1931 + 'size_units' => ['px', '%', 'em'],
1932 + 'selectors' => [
1799 1933 '{{WRAPPER}} .ff-el-progress' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1800 1934 ],
1801 1935 'condition' => [
1802 - 'show_form_progressbar' => 'yes'
1803 - ]
1936 + 'show_form_progressbar' => 'yes',
1937 + ],
1804 1938 ]
1805 1939 );
1806 1940
1807 1941 $this->end_controls_tab();
@@ -1808,11 +1942,11 @@
1808 1942
1809 1943 $this->start_controls_tab(
1810 1944 'form_progressbar_filled',
1811 1945 [
1812 - 'label' => __('Filled', 'fluentform'),
1946 + 'label' => __('Filled', 'fluentform'),
1813 1947 'condition' => [
1814 - 'show_form_progressbar' => 'yes'
1948 + 'show_form_progressbar' => 'yes',
1815 1949 ],
1816 1950 ]
1817 1951 );
1818 1952
@@ -1818,34 +1952,32 @@
1818 1952
1819 1953 $this->add_group_control(
1820 1954 Group_Control_Background::get_type(),
1821 1955 [
1822 - 'name' => 'form_progressbar_bg_filled',
1823 - 'label' => __( 'Background', 'fluentform' ),
1824 - 'types' => [ 'classic', 'gradient' ],
1825 - 'selector' => '{{WRAPPER}} .ff-el-progress-bar',
1956 + 'name' => 'form_progressbar_bg_filled',
1957 + 'label' => __('Background', 'fluentform'),
1958 + 'types' => ['classic', 'gradient'],
1959 + 'selector' => '{{WRAPPER}} .ff-el-progress-bar',
1826 1960 'condition' => [
1827 - 'show_form_progressbar' => 'yes'
1961 + 'show_form_progressbar' => 'yes',
1828 1962 ],
1829 - 'exclude' => [
1830 - 'image'
1831 - ]
1963 + // phpcs:ignore WordPressVIPMinimum.Performance.WPQueryParams.PostNotIn_exclude -- Elementor widget parameter, not WP_Query
1964 + 'exclude' => [
1965 + 'image',
1966 + ],
1832 1967 ]
1833 1968 );
1834 1969
1835 -
1836 1970 $this->end_controls_tab();
1837 1971
1838 1972 $this->end_controls_tabs();
1839 1973
1840 -
1841 -
1842 1974 $this->add_control(
1843 1975 'form_pagination_button_style',
1844 1976 [
1845 - 'label' => __('Button', 'fluentform'),
1846 - 'type' => Controls_Manager::HEADING,
1847 - 'separator' => 'before'
1977 + 'label' => __('Button', 'fluentform'),
1978 + 'type' => Controls_Manager::HEADING,
1979 + 'separator' => 'before',
1848 1980 ]
1849 1981 );
1850 1982
1851 1983 $this->start_controls_tabs(
@@ -1851,9 +1983,8 @@
1851 1983 $this->start_controls_tabs(
1852 1984 'form_pagination_button_style_tabs'
1853 1985 );
1854 1986
1855 -
1856 1987 $this->start_controls_tab(
1857 1988 'form_pagination_button',
1858 1989 [
1859 1990 'label' => __('Normal', 'fluentform'),
@@ -1859,17 +1990,16 @@
1859 1990 'label' => __('Normal', 'fluentform'),
1860 1991 ]
1861 1992 );
1862 1993
1863 -
1864 1994 $this->add_control(
1865 1995 'form_pagination_button_color',
1866 1996 [
1867 - 'label' => __( 'Color', 'fluentform' ),
1868 - 'type' => Controls_Manager::COLOR,
1997 + 'label' => __('Color', 'fluentform'),
1998 + 'type' => Controls_Manager::COLOR,
1869 1999 'selectors' => [
1870 2000 '{{WRAPPER}} .step-nav button' => 'color: {{VALUE}};',
1871 - ]
2001 + ],
1872 2002 ]
1873 2003 );
1874 2004
1875 2005 $this->add_group_control(
@@ -1874,12 +2004,14 @@
1874 2004
1875 2005 $this->add_group_control(
1876 2006 Group_Control_Typography::get_type(),
1877 2007 [
1878 - 'name' => 'form_pagination_button_typography',
1879 - 'label' => __( 'Typography', 'fluentform' ),
1880 - 'scheme' => Scheme_Typography::TYPOGRAPHY_1,
2008 + 'name' => 'form_pagination_button_typography',
2009 + 'label' => __('Typography', 'fluentform'),
1881 2010 'selector' => '{{WRAPPER}} .step-nav button',
2011 + 'global' => [
2012 + 'default' => Global_Typography::TYPOGRAPHY_PRIMARY,
2013 + ]
1882 2014 ]
1883 2015 );
1884 2016
1885 2017 $this->add_group_control(
@@ -1884,11 +2016,11 @@
1884 2016
1885 2017 $this->add_group_control(
1886 2018 Group_Control_Background::get_type(),
1887 2019 [
1888 - 'name' => 'form_pagination_button_bg',
1889 - 'label' => __( 'Background', 'fluentform' ),
1890 - 'types' => [ 'classic', 'gradient' ],
2020 + 'name' => 'form_pagination_button_bg',
2021 + 'label' => __('Background', 'fluentform'),
2022 + 'types' => ['classic', 'gradient'],
1891 2023 'selector' => '{{WRAPPER}} .step-nav button',
1892 2024 ]
1893 2025 );
1894 2026
@@ -1894,10 +2026,10 @@
1894 2026
1895 2027 $this->add_group_control(
1896 2028 Group_Control_Border::get_type(),
1897 2029 [
1898 - 'name' => 'form_pagination_button_border',
1899 - 'label' => __( 'Border', 'fluentform' ),
2030 + 'name' => 'form_pagination_button_border',
2031 + 'label' => __('Border', 'fluentform'),
1900 2032 'selector' => '{{WRAPPER}} .step-nav button',
1901 2033 ]
1902 2034 );
1903 2035
@@ -1903,12 +2035,12 @@
1903 2035
1904 2036 $this->add_control(
1905 2037 'form_pagination_button_border_radius',
1906 2038 [
1907 - 'label' => __( 'Border Radius', 'fluentform' ),
1908 - 'type' => Controls_Manager::DIMENSIONS,
1909 - 'size_units' => [ 'px', '%', 'em' ],
1910 - 'selectors' => [
2039 + 'label' => __('Border Radius', 'fluentform'),
2040 + 'type' => Controls_Manager::DIMENSIONS,
2041 + 'size_units' => ['px', '%', 'em'],
2042 + 'selectors' => [
1911 2043 '{{WRAPPER}} .step-nav button' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1912 2044 ],
1913 2045 ]
1914 2046 );
@@ -1915,12 +2047,12 @@
1915 2047
1916 2048 $this->add_control(
1917 2049 'form_pagination_button_padding',
1918 2050 [
1919 - 'label' => __( 'Padding', 'fluentform' ),
1920 - 'type' => Controls_Manager::DIMENSIONS,
1921 - 'size_units' => [ 'px', '%', 'em' ],
1922 - 'selectors' => [
2051 + 'label' => __('Padding', 'fluentform'),
2052 + 'type' => Controls_Manager::DIMENSIONS,
2053 + 'size_units' => ['px', '%', 'em'],
2054 + 'selectors' => [
1923 2055 '{{WRAPPER}} .step-nav button' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1924 2056 ],
1925 2057 ]
1926 2058 );
@@ -1936,13 +2068,13 @@
1936 2068
1937 2069 $this->add_control(
1938 2070 'form_pagination_button_hover_color',
1939 2071 [
1940 - 'label' => __( 'Color', 'fluentform' ),
1941 - 'type' => Controls_Manager::COLOR,
2072 + 'label' => __('Color', 'fluentform'),
2073 + 'type' => Controls_Manager::COLOR,
1942 2074 'selectors' => [
1943 2075 '{{WRAPPER}} .step-nav button:hover' => 'color: {{VALUE}};',
1944 - ]
2076 + ],
1945 2077 ]
1946 2078 );
1947 2079
1948 2080 $this->add_group_control(
@@ -1947,11 +2079,11 @@
1947 2079
1948 2080 $this->add_group_control(
1949 2081 Group_Control_Background::get_type(),
1950 2082 [
1951 - 'name' => 'form_pagination_button_hover_bg',
1952 - 'label' => __( 'Background', 'fluentform' ),
1953 - 'types' => [ 'classic', 'gradient' ],
2083 + 'name' => 'form_pagination_button_hover_bg',
2084 + 'label' => __('Background', 'fluentform'),
2085 + 'types' => ['classic', 'gradient'],
1954 2086 'selector' => '{{WRAPPER}} .step-nav button:hover',
1955 2087 ]
1956 2088 );
1957 2089
@@ -1957,13 +2089,13 @@
1957 2089
1958 2090 $this->add_control(
1959 2091 'form_pagination_button_border_hover_color',
1960 2092 [
1961 - 'label' => __( 'Border Color', 'fluentform' ),
1962 - 'type' => Controls_Manager::COLOR,
2093 + 'label' => __('Border Color', 'fluentform'),
2094 + 'type' => Controls_Manager::COLOR,
1963 2095 'selectors' => [
1964 2096 '{{WRAPPER}} .step-nav button:hover' => 'border-color: {{VALUE}};',
1965 - ]
2097 + ],
1966 2098 ]
1967 2099 );
1968 2100
1969 2101 $this->add_control(
@@ -1968,12 +2100,12 @@
1968 2100
1969 2101 $this->add_control(
1970 2102 'form_pagination_button_border_hover_radius',
1971 2103 [
1972 - 'label' => __( 'Border Radius', 'fluentform' ),
1973 - 'type' => Controls_Manager::DIMENSIONS,
1974 - 'size_units' => [ 'px', '%', 'em' ],
1975 - 'selectors' => [
2104 + 'label' => __('Border Radius', 'fluentform'),
2105 + 'type' => Controls_Manager::DIMENSIONS,
2106 + 'size_units' => ['px', '%', 'em'],
2107 + 'selectors' => [
1976 2108 '{{WRAPPER}} .step-nav button:hover' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1977 2109 ],
1978 2110 ]
1979 2111 );
@@ -1981,19 +2113,19 @@
1981 2113 $this->end_controls_tab();
1982 2114
1983 2115 $this->end_controls_tabs();
1984 2116
1985 -
1986 2117 $this->end_controls_section();
1987 2118 }
1988 2119 }
1989 2120
1990 - protected function register_submit_button_style_controls(){
2121 + protected function register_submit_button_style_controls()
2122 + {
1991 2123 $this->start_controls_section(
1992 2124 'section_form_submit_button_style',
1993 2125 [
1994 2126 'label' => __('Submit Button', 'fluentform'),
1995 - 'tab' => Controls_Manager::TAB_STYLE,
2127 + 'tab' => Controls_Manager::TAB_STYLE,
1996 2128 ]
1997 2129 );
1998 2130
1999 2131 $this->add_responsive_control(
@@ -1998,27 +2130,27 @@
1998 2130
1999 2131 $this->add_responsive_control(
2000 2132 'form_submit_button_align',
2001 2133 [
2002 - 'label' => __('Alignment', 'fluentform'),
2003 - 'type' => Controls_Manager::CHOOSE,
2134 + 'label' => __('Alignment', 'fluentform'),
2135 + 'type' => Controls_Manager::CHOOSE,
2004 2136 'options' => [
2005 2137 'left' => [
2006 2138 'title' => __('Left', 'fluentform'),
2007 - 'icon' => 'eicon-h-align-left',
2139 + 'icon' => 'eicon-h-align-left',
2008 2140 ],
2009 2141 'center' => [
2010 2142 'title' => __('Center', 'fluentform'),
2011 - 'icon' => 'eicon-h-align-center',
2143 + 'icon' => 'eicon-h-align-center',
2012 2144 ],
2013 2145 'right' => [
2014 2146 'title' => __('Right', 'fluentform'),
2015 - 'icon' => 'eicon-h-align-right',
2147 + 'icon' => 'eicon-h-align-right',
2016 2148 ],
2017 2149 ],
2018 - 'default' => '',
2150 + 'default' => '',
2019 2151 'prefix_class' => 'fluentform-widget-submit-button-',
2020 - 'condition' => [
2152 + 'condition' => [
2021 2153 'form_submit_button_width_type' => 'custom',
2022 2154 ],
2023 2155 ]
2024 2156 );
@@ -2025,14 +2157,14 @@
2025 2157
2026 2158 $this->add_control(
2027 2159 'form_submit_button_width_type',
2028 2160 [
2029 - 'label' => __('Width', 'fluentform'),
2030 - 'type' => Controls_Manager::SELECT,
2161 + 'label' => __('Width', 'fluentform'),
2162 + 'type' => Controls_Manager::SELECT,
2031 2163 'default' => 'custom',
2032 2164 'options' => [
2033 2165 'full-width' => __('Full Width', 'fluentform'),
2034 - 'custom' => __('Custom', 'fluentform'),
2166 + 'custom' => __('Custom', 'fluentform'),
2035 2167 ],
2036 2168 'prefix_class' => 'fluentform-widget-submit-button-',
2037 2169 ]
2038 2170 );
@@ -2040,20 +2172,19 @@
2040 2172 $this->add_responsive_control(
2041 2173 'form_submit_button_width',
2042 2174 [
2043 2175 'label' => __('Width', 'fluentform'),
2044 - 'type' => Controls_Manager::SLIDER,
2176 + 'type' => Controls_Manager::SLIDER,
2045 2177 'range' => [
2046 2178 'px' => [
2047 - 'min' => 0,
2048 - 'max' => 1200,
2179 + 'min' => 0,
2180 + 'max' => 1200,
2049 2181 'step' => 1,
2050 2182 ],
2051 2183 ],
2052 2184 'size_units' => ['px', '%'],
2053 - 'selectors' => [
2054 - '{{WRAPPER}} .fluentform-widget-wrapper .ff-el-group .ff-btn-submit' => 'width: {{SIZE}}{{UNIT}}',
2055 - ],
2185 + 'selectors' => [
2186 + '{{WRAPPER}} .fluentform-widget-wrapper .ff-el-group .ff-btn-submit' => 'width: {{SIZE}}{{UNIT}}', ],
2056 2187 'condition' => [
2057 2188 'form_submit_button_width_type' => 'custom',
2058 2189 ],
2059 2190 ]
@@ -2070,11 +2201,11 @@
2070 2201
2071 2202 $this->add_control(
2072 2203 'form_submit_button_bg_color_normal',
2073 2204 [
2074 - 'label' => __('Background Color', 'fluentform'),
2075 - 'type' => Controls_Manager::COLOR,
2076 - 'default' => '#409EFF',
2205 + 'label' => __('Background Color', 'fluentform'),
2206 + 'type' => Controls_Manager::COLOR,
2207 + 'default' => '#1a7efb',
2077 2208 'selectors' => [
2078 2209 '{{WRAPPER}} .fluentform-widget-wrapper .ff-el-group .ff-btn-submit' => 'background-color: {{VALUE}} !important;',
2079 2210 ],
2080 2211 ]
@@ -2082,11 +2213,11 @@
2082 2213
2083 2214 $this->add_control(
2084 2215 'form_submit_button_text_color_normal',
2085 2216 [
2086 - 'label' => __('Text Color', 'fluentform'),
2087 - 'type' => Controls_Manager::COLOR,
2088 - 'default' => '#ffffff',
2217 + 'label' => __('Text Color', 'fluentform'),
2218 + 'type' => Controls_Manager::COLOR,
2219 + 'default' => '#ffffff',
2089 2220 'selectors' => [
2090 2221 '{{WRAPPER}} .fluentform-widget-wrapper .ff-el-group .ff-btn-submit' => 'color: {{VALUE}} !important;',
2091 2222 ],
2092 2223 ]
@@ -2094,13 +2225,13 @@
2094 2225
2095 2226 $this->add_group_control(
2096 2227 Group_Control_Border::get_type(),
2097 2228 [
2098 - 'name' => 'form_submit_button_border_normal',
2099 - 'label' => __('Border', 'fluentform'),
2229 + 'name' => 'form_submit_button_border_normal',
2230 + 'label' => __('Border', 'fluentform'),
2100 2231 'placeholder' => '1px',
2101 - 'default' => '1px',
2102 - 'selector' => '{{WRAPPER}} .fluentform-widget-wrapper .ff-el-group .ff-btn-submit',
2232 + 'default' => '1px',
2233 + 'selector' => '{{WRAPPER}} .fluentform-widget-wrapper .ff-el-group .ff-btn-submit',
2103 2234 ]
2104 2235 );
2105 2236
2106 2237 $this->add_control(
@@ -2105,12 +2236,12 @@
2105 2236
2106 2237 $this->add_control(
2107 2238 'form_submit_button_border_radius',
2108 2239 [
2109 - 'label' => __('Border Radius', 'fluentform'),
2110 - 'type' => Controls_Manager::DIMENSIONS,
2240 + 'label' => __('Border Radius', 'fluentform'),
2241 + 'type' => Controls_Manager::DIMENSIONS,
2111 2242 'size_units' => ['px', 'em', '%'],
2112 - 'selectors' => [
2243 + 'selectors' => [
2113 2244 '{{WRAPPER}} .fluentform-widget-wrapper .ff-el-group .ff-btn-submit' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
2114 2245 ],
2115 2246 ]
2116 2247 );
@@ -2117,12 +2248,12 @@
2117 2248
2118 2249 $this->add_responsive_control(
2119 2250 'form_submit_button_padding',
2120 2251 [
2121 - 'label' => __('Padding', 'fluentform'),
2122 - 'type' => Controls_Manager::DIMENSIONS,
2252 + 'label' => __('Padding', 'fluentform'),
2253 + 'type' => Controls_Manager::DIMENSIONS,
2123 2254 'size_units' => ['px', 'em', '%'],
2124 - 'selectors' => [
2255 + 'selectors' => [
2125 2256 '{{WRAPPER}} .fluentform-widget-wrapper .ff-el-group .ff-btn-submit' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
2126 2257 ],
2127 2258 ]
2128 2259 );
@@ -2130,18 +2261,18 @@
2130 2261 $this->add_responsive_control(
2131 2262 'form_submit_button_margin',
2132 2263 [
2133 2264 'label' => __('Margin Top', 'fluentform'),
2134 - 'type' => Controls_Manager::SLIDER,
2265 + 'type' => Controls_Manager::SLIDER,
2135 2266 'range' => [
2136 2267 'px' => [
2137 - 'min' => 0,
2138 - 'max' => 150,
2268 + 'min' => 0,
2269 + 'max' => 150,
2139 2270 'step' => 1,
2140 2271 ],
2141 2272 ],
2142 2273 'size_units' => ['px', 'em', '%'],
2143 - 'selectors' => [
2274 + 'selectors' => [
2144 2275 '{{WRAPPER}} .fluentform-widget-wrapper .ff-el-group .ff-btn-submit' => 'margin-top: {{SIZE}}{{UNIT}}',
2145 2276 ],
2146 2277 ]
2147 2278 );
@@ -2148,11 +2279,11 @@
2148 2279
2149 2280 $this->add_group_control(
2150 2281 Group_Control_Typography::get_type(),
2151 2282 [
2152 - 'name' => 'form_submit_button_typography',
2153 - 'label' => __('Typography', 'fluentform'),
2154 - 'selector' => '{{WRAPPER}} .fluentform-widget-wrapper .ff-el-group .ff-btn-submit',
2283 + 'name' => 'form_submit_button_typography',
2284 + 'label' => __('Typography', 'fluentform'),
2285 + 'selector' => '{{WRAPPER}} .fluentform-widget-wrapper .ff-el-group .ff-btn-submit',
2155 2286 'separator' => 'before',
2156 2287 ]
2157 2288 );
2158 2289
@@ -2158,10 +2289,10 @@
2158 2289
2159 2290 $this->add_group_control(
2160 2291 Group_Control_Box_Shadow::get_type(),
2161 2292 [
2162 - 'name' => 'form_submit_button_box_shadow',
2163 - 'selector' => '{{WRAPPER}} .fluentform-widget-wrapper .ff-el-group .ff-btn-submit',
2293 + 'name' => 'form_submit_button_box_shadow',
2294 + 'selector' => '{{WRAPPER}} .fluentform-widget-wrapper .ff-el-group .ff-btn-submit',
2164 2295 'separator' => 'before',
2165 2296 ]
2166 2297 );
2167 2298
@@ -2176,11 +2307,11 @@
2176 2307
2177 2308 $this->add_control(
2178 2309 'form_submit_button_bg_color_hover',
2179 2310 [
2180 - 'label' => __('Background Color', 'fluentform'),
2181 - 'type' => Controls_Manager::COLOR,
2182 - 'default' => '',
2311 + 'label' => __('Background Color', 'fluentform'),
2312 + 'type' => Controls_Manager::COLOR,
2313 + 'default' => '',
2183 2314 'selectors' => [
2184 2315 '{{WRAPPER}} .fluentform-widget-wrapper .ff-el-group .ff-btn-submit:hover' => 'background-color: {{VALUE}} !important;',
2185 2316 ],
2186 2317 ]
@@ -2188,11 +2319,11 @@
2188 2319
2189 2320 $this->add_control(
2190 2321 'form_submit_button_text_color_hover',
2191 2322 [
2192 - 'label' => __('Text Color', 'fluentform'),
2193 - 'type' => Controls_Manager::COLOR,
2194 - 'default' => '',
2323 + 'label' => __('Text Color', 'fluentform'),
2324 + 'type' => Controls_Manager::COLOR,
2325 + 'default' => '',
2195 2326 'selectors' => [
2196 2327 '{{WRAPPER}} .fluentform-widget-wrapper .ff-el-group .ff-btn-submit:hover' => 'color: {{VALUE}} !important;',
2197 2328 ],
2198 2329 ]
@@ -2200,11 +2331,11 @@
2200 2331
2201 2332 $this->add_control(
2202 2333 'form_submit_button_border_color_hover',
2203 2334 [
2204 - 'label' => __('Border Color', 'fluentform'),
2205 - 'type' => Controls_Manager::COLOR,
2206 - 'default' => '',
2335 + 'label' => __('Border Color', 'fluentform'),
2336 + 'type' => Controls_Manager::COLOR,
2337 + 'default' => '',
2207 2338 'selectors' => [
2208 2339 '{{WRAPPER}} .fluentform-widget-wrapper .ff-el-group .ff-btn-submit:hover' => 'border-color: {{VALUE}}',
2209 2340 ],
2210 2341 ]
@@ -2216,15 +2347,15 @@
2216 2347
2217 2348 $this->end_controls_section();
2218 2349 }
2219 2350
2220 - protected function register_success_message_style_controls(){
2221 -
2351 + protected function register_success_message_style_controls()
2352 + {
2222 2353 $this->start_controls_section(
2223 2354 'section_form_success_message_style',
2224 2355 [
2225 2356 'label' => __('Success Message', 'fluentform'),
2226 - 'tab' => Controls_Manager::TAB_STYLE,
2357 + 'tab' => Controls_Manager::TAB_STYLE,
2227 2358 ]
2228 2359 );
2229 2360
2230 2361 $this->add_control(
@@ -2229,10 +2360,10 @@
2229 2360
2230 2361 $this->add_control(
2231 2362 'form_success_message_bg_color',
2232 2363 [
2233 - 'label' => __('Background Color', 'fluentform'),
2234 - 'type' => Controls_Manager::COLOR,
2364 + 'label' => __('Background Color', 'fluentform'),
2365 + 'type' => Controls_Manager::COLOR,
2235 2366 'selectors' => [
2236 2367 '{{WRAPPER}} .fluentform-widget-wrapper .ff-message-success' => 'background-color: {{VALUE}}',
2237 2368 ],
2238 2369 ]
@@ -2240,10 +2371,10 @@
2240 2371
2241 2372 $this->add_control(
2242 2373 'form_success_message_text_color',
2243 2374 [
2244 - 'label' => __('Text Color', 'fluentform'),
2245 - 'type' => Controls_Manager::COLOR,
2375 + 'label' => __('Text Color', 'fluentform'),
2376 + 'type' => Controls_Manager::COLOR,
2246 2377 'selectors' => [
2247 2378 '{{WRAPPER}} .fluentform-widget-wrapper .ff-message-success' => 'color: {{VALUE}}',
2248 2379 ],
2249 2380 ]
@@ -2251,13 +2382,13 @@
2251 2382
2252 2383 $this->add_group_control(
2253 2384 Group_Control_Border::get_type(),
2254 2385 [
2255 - 'name' => 'form_success_message_border',
2256 - 'label' => __('Border', 'fluentform'),
2386 + 'name' => 'form_success_message_border',
2387 + 'label' => __('Border', 'fluentform'),
2257 2388 'placeholder' => '1px',
2258 - 'default' => '1px',
2259 - 'selector' => '{{WRAPPER}} .fluentform-widget-wrapper .ff-message-success',
2389 + 'default' => '1px',
2390 + 'selector' => '{{WRAPPER}} .fluentform-widget-wrapper .ff-message-success',
2260 2391 ]
2261 2392 );
2262 2393
2263 2394 $this->add_group_control(
@@ -2262,10 +2393,10 @@
2262 2393
2263 2394 $this->add_group_control(
2264 2395 Group_Control_Typography::get_type(),
2265 2396 [
2266 - 'name' => 'form_success_message_typography',
2267 - 'label' => __('Typography', 'fluentform'),
2397 + 'name' => 'form_success_message_typography',
2398 + 'label' => __('Typography', 'fluentform'),
2268 2399 'selector' => '{{WRAPPER}} .fluentform-widget-wrapper .ff-message-success',
2269 2400 ]
2270 2401 );
2271 2402
@@ -2271,14 +2402,15 @@
2271 2402
2272 2403 $this->end_controls_section();
2273 2404 }
2274 2405
2275 - protected function register_errors_style_controls(){
2406 + protected function register_errors_style_controls()
2407 + {
2276 2408 $this->start_controls_section(
2277 2409 'section_form_error_style',
2278 2410 [
2279 2411 'label' => __('Error Message', 'fluentform'),
2280 - 'tab' => Controls_Manager::TAB_STYLE,
2412 + 'tab' => Controls_Manager::TAB_STYLE,
2281 2413 ]
2282 2414 );
2283 2415
2284 2416 $this->add_control(
@@ -2283,11 +2415,11 @@
2283 2415
2284 2416 $this->add_control(
2285 2417 'form_error_message_text_color',
2286 2418 [
2287 - 'label' => __('Color', 'fluentform'),
2288 - 'type' => Controls_Manager::COLOR,
2289 - 'default' => '',
2419 + 'label' => __('Color', 'fluentform'),
2420 + 'type' => Controls_Manager::COLOR,
2421 + 'default' => '',
2290 2422 'selectors' => [
2291 2423 '{{WRAPPER}} .fluentform-widget-wrapper .error.text-danger' => 'color: {{VALUE}}',
2292 2424 ],
2293 2425 ]
@@ -2295,10 +2427,10 @@
2295 2427
2296 2428 $this->add_group_control(
2297 2429 Group_Control_Typography::get_type(),
2298 2430 [
2299 - 'name' => 'form_error_message_typography',
2300 - 'label' => __('Typography', 'fluentform'),
2431 + 'name' => 'form_error_message_typography',
2432 + 'label' => __('Typography', 'fluentform'),
2301 2433 'selector' => '{{WRAPPER}} .fluentform-widget-wrapper .error.text-danger',
2302 2434 ]
2303 2435 );
2304 2436
@@ -2304,12 +2436,12 @@
2304 2436
2305 2437 $this->add_responsive_control(
2306 2438 'form_error_message_padding',
2307 2439 [
2308 - 'label' => __('Padding', 'fluentform'),
2309 - 'type' => Controls_Manager::DIMENSIONS,
2440 + 'label' => __('Padding', 'fluentform'),
2441 + 'type' => Controls_Manager::DIMENSIONS,
2310 2442 'size_units' => ['px', 'em', '%'],
2311 - 'selectors' => [
2443 + 'selectors' => [
2312 2444 '{{WRAPPER}} .fluentform-widget-wrapper .error.text-danger' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
2313 2445 ],
2314 2446 ]
2315 2447 );
@@ -2316,12 +2448,12 @@
2316 2448
2317 2449 $this->add_responsive_control(
2318 2450 'form_error_message_margin',
2319 2451 [
2320 - 'label' => __('Margin', 'fluentform'),
2321 - 'type' => Controls_Manager::DIMENSIONS,
2452 + 'label' => __('Margin', 'fluentform'),
2453 + 'type' => Controls_Manager::DIMENSIONS,
2322 2454 'size_units' => ['px', 'em', '%'],
2323 - 'selectors' => [
2455 + 'selectors' => [
2324 2456 '{{WRAPPER}} .fluentform-widget-wrapper .error.text-danger' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
2325 2457 ],
2326 2458 ]
2327 2459 );
@@ -2328,8 +2460,15 @@
2328 2460
2329 2461 $this->end_controls_section();
2330 2462 }
2331 2463
2464 + private function getStylePresets()
2465 + {
2466 + return [
2467 + 'ffs_default' => __('Default', 'fluentform'),
2468 + 'ffs_inherit_theme' => __('Inherit Theme Style', 'fluentform'),
2469 + ];
2470 + }
2332 2471
2333 2472 /**
2334 2473 * Render the widget output on the frontend.
2335 2474 *
@@ -2338,9 +2477,10 @@
2338 2477 * @since 1.0.0
2339 2478 *
2340 2479 * @access protected
2341 2480 */
2342 - protected function render() {
2481 + protected function render()
2482 + {
2343 2483 $settings = $this->get_settings_for_display();
2344 2484 extract($settings);
2345 2485
2346 2486 $this->add_render_attribute(
@@ -2347,53 +2487,58 @@
2347 2487 'fluentform_widget_wrapper',
2348 2488 [
2349 2489 'class' => [
2350 2490 'fluentform-widget-wrapper',
2351 - ]
2491 + ],
2352 2492 ]
2353 2493 );
2354 2494
2495 + if ('yes' != $placeholder_switch) {
2496 + $this->add_render_attribute('fluentform_widget_wrapper', 'class', 'hide-placeholder');
2497 + }
2355 2498
2356 - if ( $placeholder_switch != 'yes' ) {
2357 - $this->add_render_attribute( 'fluentform_widget_wrapper', 'class', 'hide-placeholder' );
2499 + if ('yes' != $labels_switch) {
2500 + $this->add_render_attribute('fluentform_widget_wrapper', 'class', 'hide-fluent-form-labels');
2358 2501 }
2359 2502
2360 - if( $labels_switch != 'yes' ) {
2361 - $this->add_render_attribute( 'fluentform_widget_wrapper', 'class', 'hide-fluent-form-labels' );
2503 + if ('no' == $error_messages) {
2504 + $this->add_render_attribute('fluentform_widget_wrapper', 'class', 'hide-error-message');
2362 2505 }
2363 2506
2364 - if( $error_messages == 'no' ) {
2365 - $this->add_render_attribute( 'fluentform_widget_wrapper', 'class', 'hide-error-message' );
2507 + if ('yes' == $form_custom_radio_checkbox) {
2508 + $this->add_render_attribute('fluentform_widget_wrapper', 'class', 'fluentform-widget-custom-radio-checkbox');
2366 2509 }
2367 2510
2368 - if ( $form_custom_radio_checkbox == 'yes' ) {
2369 - $this->add_render_attribute( 'fluentform_widget_wrapper', 'class', 'fluentform-widget-custom-radio-checkbox' );
2511 + if ($form_container_alignment) {
2512 + $this->add_render_attribute('fluentform_widget_wrapper', 'class', 'fluentform-widget-align-' . $form_container_alignment . '');
2370 2513 }
2371 -
2372 - if ( $form_container_alignment ) {
2373 - $this->add_render_attribute( 'fluentform_widget_wrapper', 'class', 'fluentform-widget-align-'.$form_container_alignment.'' );
2514 +
2515 + if (isset($theme_style)) {
2516 + $theme_style = sanitize_text_field($theme_style);
2517 + } else {
2518 + $theme_style = '';
2374 2519 }
2375 2520
2376 - if ( ! empty( $form_list ) ) { ?>
2521 + if (!empty($form_list)) { ?>
2377 2522
2378 - <div <?php echo $this->get_render_attribute_string('fluentform_widget_wrapper'); ?>>
2523 + <div <?php echo wp_kses_post($this->get_render_attribute_string('fluentform_widget_wrapper')); ?>>
2379 2524
2380 - <?php if ($custom_title_description == 'yes') { ?>
2381 - <div class="fluentform-widget-heading">
2382 - <?php if ($form_title_custom != '') { ?>
2383 - <h3 class="fluentform-widget-title">
2384 - <?php echo esc_attr($form_title_custom); ?>
2385 - </h3>
2386 - <?php } ?>
2387 - <?php if ($form_description_custom != '') { ?>
2388 - <p class="fluentform-widget-description">
2389 - <?php echo $this->parse_text_editor($form_description_custom); ?>
2390 - </p>
2391 - <?php } ?>
2392 - </div>
2393 - <?php } ?>
2525 + <?php if ('yes' == $custom_title_description) { ?>
2526 + <div class="fluentform-widget-heading">
2527 + <?php if ('' != $form_title_custom) { ?>
2528 + <h3 class="fluentform-widget-title">
2529 + <?php echo esc_attr($form_title_custom); ?>
2530 + </h3>
2531 + <?php } ?>
2532 + <?php if ('' != $form_description_custom) { ?>
2533 + <p class="fluentform-widget-description">
2534 + <?php echo wp_kses_post($this->parse_text_editor($form_description_custom)); ?>
2535 + </p>
2536 + <?php } ?>
2537 + </div>
2538 + <?php } ?>
2394 2539
2395 - <?php echo do_shortcode('[fluentform id="' . $form_list . '"]'); ?>
2540 + <?php echo do_shortcode('[fluentform id="' . $form_list . '" theme="' . $theme_style . '"]'); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- $form_list is escaped before being passed in.?>
2396 2541 </div>
2397 2542
2398 2543 <?php
2399 2544 }
@@ -2398,9 +2543,8 @@
2398 2543 <?php
2399 2544 }
2400 2545 }
2401 2546
2402 -
2403 2547 /**
2404 2548 * Render the widget output in the editor.
2405 2549 *
2406 2550 * Written as a Backbone JavaScript template and used to generate the live preview.
@@ -2408,6 +2552,8 @@
2408 2552 * @since 1.0.0
2409 2553 *
2410 2554 * @access protected
2411 2555 */
2412 - protected function _content_template() {}
2556 + protected function content_template()
2557 + {
2558 + }
2413 2559 }