PluginProbe ʕ •ᴥ•ʔ
Essential Addons for Elementor – Popular Elementor Templates & Widgets / 2.10.0
Essential Addons for Elementor – Popular Elementor Templates & Widgets v2.10.0
6.6.5 6.6.4 6.6.3 5.7.3 5.7.4 5.8.0 5.8.1 5.8.10 5.8.11 5.8.12 5.8.13 5.8.14 5.8.15 5.8.16 5.8.18 5.8.2 5.8.3 5.8.4 5.8.5 5.8.6 5.8.7 5.8.8 5.8.9 5.9.0 5.9.1 5.9.10 5.9.11 5.9.12 5.9.13 5.9.14 5.9.15 5.9.16 5.9.17 5.9.18 5.9.19 5.9.2 5.9.20 5.9.21 5.9.22 5.9.23 5.9.24 5.9.25 5.9.26 5.9.27 5.9.3 5.9.4 5.9.5 5.9.6 5.9.7 5.9.8 5.9.9 6.0.0 6.0.1 6.0.10 6.0.11 6.0.12 6.0.13 6.0.14 6.0.15 6.0.2 6.0.3 6.0.4 6.0.5 6.0.6 6.0.7 6.0.8 6.0.9 6.1.0 6.1.1 6.1.10 6.1.11 trunk 6.1.12 1.0.0 6.1.13 1.0.1 6.1.14 1.1.0 6.1.15 2.0 6.1.17 2.1 6.1.18 2.10.0 6.1.19 2.10.1 6.1.2 2.10.2 6.1.20 2.10.3 6.1.3 2.10.4 6.1.4 2.10.5 6.1.5 2.2.0 6.1.6 2.2.1 6.1.7 2.2.2 6.1.8 2.2.3 6.1.9 2.2.4 6.2.0 2.2.5 6.2.1 2.3.0 6.2.2 2.3.1 6.2.3 2.4.0 6.2.4 2.4.1 6.3.0 2.4.2 6.3.1 2.4.3 6.3.2 2.5.0 6.3.3 2.6.0 6.4.0 2.7.0 6.5.0 2.7.1 6.5.1 2.7.10 6.5.10 2.7.11 6.5.11 2.7.2 6.5.12 2.7.3 6.5.13 2.7.4 6.5.2 2.7.5 6.5.3 2.7.6 6.5.4 2.7.7 6.5.5 2.7.8 6.5.6 2.7.9 6.5.7 2.8.0 6.5.8 2.8.1 6.5.9 2.8.2 6.6.0 2.8.3 6.6.1 2.8.4 6.6.2 2.8.5 2.8.6 2.8.7 2.9.0 2.9.1 2.9.2 2.9.3 2.9.4 2.9.5 2.9.6 2.9.7 2.9.8 2.9.9 3.0.0 3.0.1 3.0.2 3.0.3 3.0.4 3.0.5 3.1.0 3.1.1 3.1.2 3.1.3 3.1.4 3.1.4.1 3.1.5 3.2.0 3.3.0 3.3.1 3.3.2 3.3.3 3.4.0 3.5.0 3.5.1 3.5.2 3.6.0 3.6.1 3.6.2 3.7.0 3.7.1 3.7.2 3.8.0 3.8.1 3.8.2 3.8.3 3.8.4 3.8.5 3.9.0 3.9.1 3.9.2 3.9.3 3.9.4 4.0.0 4.0.1 4.0.2 4.0.3 4.0.4 4.1.0 4.1.1 4.1.2 4.2.0 4.2.1 4.2.2 4.2.3 4.2.4 4.3.0 4.3.1 4.3.2 4.3.3 4.3.4 4.3.5 4.3.6 4.3.7 4.3.8 4.3.9 4.4.0 4.4.1 4.5.0 4.5.1 4.5.2 4.5.3 4.5.4 4.5.5 4.6.0 4.6.1 4.6.2 4.6.3 4.6.4 4.6.5 4.6.6 4.7.0 4.7.1 4.7.2 4.7.3 4.7.4 4.7.5 4.8.0 4.8.1 4.8.2 4.8.3 4.8.4 4.9.0 4.9.1 4.9.2 4.9.3 4.9.4 4.9.5 4.9.6 4.9.7 5.0.0 5.0.1 5.0.10 5.0.11 5.0.12 5.0.13 5.0.2 5.0.3 5.0.4 5.0.5 5.0.6 5.0.7 5.0.8 5.0.9 5.1.0 5.1.1 5.1.2 5.1.3 5.1.4 5.1.5 5.1.6 5.1.7 5.1.8 5.1.9 5.2.0 5.2.1 5.2.2 5.2.3 5.2.4 5.3.0 5.3.1 5.3.2 5.4.6 5.5.5 5.6.5 5.7.2
essential-addons-for-elementor-lite / elements / Eael_Caldera_Forms.php
essential-addons-for-elementor-lite / elements Last commit date
Eael_Adv_Accordion.php 7 years ago Eael_Adv_Tabs.php 7 years ago Eael_Caldera_Forms.php 7 years ago Eael_Contact_Form_7.php 7 years ago Eael_Content_Ticker.php 7 years ago Eael_Countdown.php 7 years ago Eael_Creative_Button.php 7 years ago Eael_Cta_Box.php 7 years ago Eael_Data_Table.php 7 years ago Eael_Dual_Color_Header.php 7 years ago Eael_Fancy_Text.php 7 years ago Eael_Feature_List.php 7 years ago Eael_Filterable_Gallery.php 7 years ago Eael_Flip_Box.php 7 years ago Eael_GravityForms.php 7 years ago Eael_Image_Accordion.php 7 years ago Eael_Info_Box.php 7 years ago Eael_NinjaForms.php 7 years ago Eael_Post_Grid.php 7 years ago Eael_Post_Timeline.php 7 years ago Eael_Pricing_Table.php 7 years ago Eael_Product_Grid.php 7 years ago Eael_Progress_Bar.php 7 years ago Eael_Team_Member.php 7 years ago Eael_Testimonial.php 7 years ago Eael_Tooltip.php 7 years ago Eael_Twitter_Feed.php 7 years ago Eael_WeForms.php 7 years ago Eael_WpForms.php 7 years ago
Eael_Caldera_Forms.php
1521 lines
1 <?php
2 namespace Essential_Addons_Elementor\Elements;
3
4 // If this file is called directly, abort.
5 if (!defined('ABSPATH')) {
6 exit;
7 }
8
9 use \Elementor\Controls_Manager as Controls_Manager;
10 use \Elementor\Group_Control_Border as Group_Control_Border;
11 use \Elementor\Group_Control_Box_Shadow as Group_Control_Box_Shadow;
12 use \Elementor\Group_Control_Typography as Group_Control_Typography;
13 use \Elementor\Scheme_Typography as Scheme_Typography;
14 use \Elementor\Widget_Base as Widget_Base;
15
16 class Eael_Caldera_Forms extends Widget_Base {
17
18 use \Essential_Addons_Elementor\Traits\Helper;
19
20 public function get_name() {
21 return 'eael-caldera-form';
22 }
23
24 public function get_title() {
25 return __( 'EA Caldera Forms', 'essential-addons-elementor' );
26 }
27
28 public function get_categories() {
29 return [ 'essential-addons-elementor' ];
30 }
31
32 public function get_icon() {
33 return 'fa fa-envelope-o';
34 }
35
36 protected function _register_controls() {
37
38 /*-----------------------------------------------------------------------------------*/
39 /* Content Tab
40 /*-----------------------------------------------------------------------------------*/
41
42 /**
43 * Content Tab: Caldera Forms
44 * -------------------------------------------------
45 */
46 $this->start_controls_section(
47 'section_info_box',
48 [
49 'label' => __( 'Caldera Forms', 'essential-addons-elementor' ),
50 ]
51 );
52
53 $this->add_control(
54 'contact_form_list',
55 [
56 'label' => esc_html__( 'Caldera Form', 'essential-addons-elementor' ),
57 'type' => Controls_Manager::SELECT,
58 'label_block' => true,
59 'options' => $this->eael_select_caldera_form(),
60 'default' => '0',
61 ]
62 );
63
64 $this->add_control(
65 'custom_title_description',
66 [
67 'label' => __( 'Custom Title & Description', 'essential-addons-elementor' ),
68 'type' => Controls_Manager::SWITCHER,
69 'label_on' => __( 'Yes', 'essential-addons-elementor' ),
70 'label_off' => __( 'No', 'essential-addons-elementor' ),
71 'return_value' => 'yes',
72 ]
73 );
74
75 $this->add_control(
76 'form_title_custom',
77 [
78 'label' => esc_html__( 'Title', 'essential-addons-elementor' ),
79 'type' => Controls_Manager::TEXT,
80 'label_block' => true,
81 'default' => '',
82 'condition' => [
83 'custom_title_description' => 'yes',
84 ],
85 ]
86 );
87
88 $this->add_control(
89 'form_description_custom',
90 [
91 'label' => esc_html__( 'Description', 'essential-addons-elementor' ),
92 'type' => Controls_Manager::TEXTAREA,
93 'default' => '',
94 'condition' => [
95 'custom_title_description' => 'yes',
96 ],
97 ]
98 );
99
100 $this->add_control(
101 'labels_switch',
102 [
103 'label' => __( 'Labels', 'essential-addons-elementor' ),
104 'type' => Controls_Manager::SWITCHER,
105 'default' => 'yes',
106 'label_on' => __( 'Show', 'essential-addons-elementor' ),
107 'label_off' => __( 'Hide', 'essential-addons-elementor' ),
108 'return_value' => 'yes',
109 'prefix_class' => 'eael-caldera-form-labels-',
110 ]
111 );
112
113 $this->add_control(
114 'placeholder_switch',
115 [
116 'label' => __( 'Placeholder', 'essential-addons-elementor' ),
117 'type' => Controls_Manager::SWITCHER,
118 'default' => 'yes',
119 'label_on' => __( 'Show', 'essential-addons-elementor' ),
120 'label_off' => __( 'Hide', 'essential-addons-elementor' ),
121 'return_value' => 'yes',
122 ]
123 );
124
125 $this->end_controls_section();
126
127 /**
128 * Content Tab: Errors
129 * -------------------------------------------------
130 */
131 $this->start_controls_section(
132 'section_errors',
133 [
134 'label' => __( 'Errors', 'essential-addons-elementor' ),
135 ]
136 );
137
138 $this->add_control(
139 'error_messages',
140 [
141 'label' => __( 'Error Messages', 'essential-addons-elementor' ),
142 'type' => Controls_Manager::SELECT,
143 'default' => 'show',
144 'options' => [
145 'show' => __( 'Show', 'essential-addons-elementor' ),
146 'hide' => __( 'Hide', 'essential-addons-elementor' ),
147 ],
148 'selectors_dictionary' => [
149 'show' => 'block',
150 'hide' => 'none',
151 ],
152 'selectors' => [
153 '{{WRAPPER}} .eael-caldera-form .has-error .parsley-required' => 'display: {{VALUE}} !important;',
154 ],
155 ]
156 );
157
158 $this->end_controls_section();
159
160 /*-----------------------------------------------------------------------------------*/
161 /* Style Tab
162 /*-----------------------------------------------------------------------------------*/
163
164 /**
165 * Style Tab: Form Title & Description
166 * -------------------------------------------------
167 */
168 $this->start_controls_section(
169 'section_form_title_style',
170 [
171 'label' => __( 'Title & Description', 'essential-addons-elementor' ),
172 'tab' => Controls_Manager::TAB_STYLE,
173 'condition' => [
174 'custom_title_description' => 'yes',
175 ],
176 ]
177 );
178
179 $this->add_responsive_control(
180 'heading_alignment',
181 [
182 'label' => __( 'Alignment', 'essential-addons-elementor' ),
183 'type' => Controls_Manager::CHOOSE,
184 'options' => [
185 'left' => [
186 'title' => __( 'Left', 'essential-addons-elementor' ),
187 'icon' => 'fa fa-align-left',
188 ],
189 'center' => [
190 'title' => __( 'Center', 'essential-addons-elementor' ),
191 'icon' => 'fa fa-align-center',
192 ],
193 'right' => [
194 'title' => __( 'Right', 'essential-addons-elementor' ),
195 'icon' => 'fa fa-align-right',
196 ],
197 ],
198 'default' => '',
199 'selectors' => [
200 '{{WRAPPER}} .eael-caldera-form-heading' => 'text-align: {{VALUE}};',
201 ],
202 'condition' => [
203 'custom_title_description' => 'yes',
204 ],
205 ]
206 );
207
208 $this->add_control(
209 'title_heading',
210 [
211 'label' => __( 'Title', 'essential-addons-elementor' ),
212 'type' => Controls_Manager::HEADING,
213 'separator' => 'before',
214 'condition' => [
215 'custom_title_description' => 'yes',
216 ],
217 ]
218 );
219
220 $this->add_control(
221 'form_title_text_color',
222 [
223 'label' => __( 'Text Color', 'essential-addons-elementor' ),
224 'type' => Controls_Manager::COLOR,
225 'default' => '',
226 'selectors' => [
227 '{{WRAPPER}} .eael-contact-form-title' => 'color: {{VALUE}}',
228 ],
229 'condition' => [
230 'custom_title_description' => 'yes',
231 ],
232 ]
233 );
234
235 $this->add_group_control(
236 Group_Control_Typography::get_type(),
237 [
238 'name' => 'form_title_typography',
239 'label' => __( 'Typography', 'essential-addons-elementor' ),
240 'selector' => '{{WRAPPER}} .eael-contact-form-title',
241 'condition' => [
242 'custom_title_description' => 'yes',
243 ],
244 ]
245 );
246
247 $this->add_responsive_control(
248 'form_title_margin',
249 [
250 'label' => __( 'Margin', 'essential-addons-elementor' ),
251 'type' => Controls_Manager::DIMENSIONS,
252 'size_units' => [ 'px', 'em', '%' ],
253 'allowed_dimensions' => 'vertical',
254 'placeholder' => [
255 'top' => '',
256 'right' => 'auto',
257 'bottom' => '',
258 'left' => 'auto',
259 ],
260 'selectors' => [
261 '{{WRAPPER}} .eael-contact-form-title' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
262 ],
263 'condition' => [
264 'custom_title_description' => 'yes',
265 ],
266 ]
267 );
268
269 $this->add_control(
270 'description_heading',
271 [
272 'label' => __( 'Description', 'essential-addons-elementor' ),
273 'type' => Controls_Manager::HEADING,
274 'separator' => 'before',
275 'condition' => [
276 'custom_title_description' => 'yes',
277 ],
278 ]
279 );
280
281 $this->add_control(
282 'form_description_text_color',
283 [
284 'label' => __( 'Text Color', 'essential-addons-elementor' ),
285 'type' => Controls_Manager::COLOR,
286 'default' => '',
287 'selectors' => [
288 '{{WRAPPER}} .eael-contact-form-description' => 'color: {{VALUE}}',
289 ],
290 'condition' => [
291 'custom_title_description' => 'yes',
292 ],
293 ]
294 );
295
296 $this->add_group_control(
297 Group_Control_Typography::get_type(),
298 [
299 'name' => 'form_description_typography',
300 'label' => __( 'Typography', 'essential-addons-elementor' ),
301 'scheme' => Scheme_Typography::TYPOGRAPHY_4,
302 'selector' => '{{WRAPPER}} .eael-contact-form-description',
303 'condition' => [
304 'custom_title_description' => 'yes',
305 ],
306 ]
307 );
308
309 $this->add_responsive_control(
310 'form_description_margin',
311 [
312 'label' => __( 'Margin', 'essential-addons-elementor' ),
313 'type' => Controls_Manager::DIMENSIONS,
314 'size_units' => [ 'px', 'em', '%' ],
315 'allowed_dimensions' => 'vertical',
316 'placeholder' => [
317 'top' => '',
318 'right' => 'auto',
319 'bottom' => '',
320 'left' => 'auto',
321 ],
322 'selectors' => [
323 '{{WRAPPER}} .eael-contact-form-description' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
324 ],
325 'condition' => [
326 'custom_title_description' => 'yes',
327 ],
328 ]
329 );
330
331 $this->end_controls_section();
332
333 /**
334 * Style Tab: Form Container
335 * -------------------------------------------------
336 */
337 $this->start_controls_section(
338 'section_container_style',
339 [
340 'label' => __( 'Form Container', 'essential-addons-elementor' ),
341 'tab' => Controls_Manager::TAB_STYLE,
342 ]
343 );
344
345 $this->add_control(
346 'eael_contact_form_background',
347 [
348 'label' => esc_html__( 'Form Background Color', 'essential-addons-elementor' ),
349 'type' => Controls_Manager::COLOR,
350 'selectors' => [
351 '{{WRAPPER}} .eael-contact-form' => 'background: {{VALUE}};',
352 ],
353 ]
354 );
355
356 $this->add_responsive_control(
357 'eael_contact_form_alignment',
358 [
359 'label' => esc_html__( 'Form Alignment', 'essential-addons-elementor' ),
360 'type' => Controls_Manager::CHOOSE,
361 'label_block' => true,
362 'options' => [
363 'default' => [
364 'title' => __( 'Default', 'essential-addons-elementor' ),
365 'icon' => 'fa fa-ban',
366 ],
367 'left' => [
368 'title' => esc_html__( 'Left', 'essential-addons-elementor' ),
369 'icon' => 'eicon-h-align-left',
370 ],
371 'center' => [
372 'title' => esc_html__( 'Center', 'essential-addons-elementor' ),
373 'icon' => 'eicon-h-align-center',
374 ],
375 'right' => [
376 'title' => esc_html__( 'Right', 'essential-addons-elementor' ),
377 'icon' => 'eicon-h-align-right',
378 ],
379 ],
380 'default' => 'default',
381 ]
382 );
383
384 $this->add_responsive_control(
385 'eael_contact_form_width',
386 [
387 'label' => esc_html__( 'Form Width', 'essential-addons-elementor' ),
388 'type' => Controls_Manager::SLIDER,
389 'size_units' => [ 'px', 'em', '%' ],
390 'range' => [
391 'px' => [
392 'min' => 10,
393 'max' => 1500,
394 ],
395 'em' => [
396 'min' => 1,
397 'max' => 80,
398 ],
399 ],
400 'selectors' => [
401 '{{WRAPPER}} .eael-contact-form' => 'width: {{SIZE}}{{UNIT}};',
402 ],
403 ]
404 );
405
406 $this->add_responsive_control(
407 'eael_contact_form_max_width',
408 [
409 'label' => esc_html__( 'Form Max Width', 'essential-addons-elementor' ),
410 'type' => Controls_Manager::SLIDER,
411 'size_units' => [ 'px', 'em', '%' ],
412 'range' => [
413 'px' => [
414 'min' => 10,
415 'max' => 1500,
416 ],
417 'em' => [
418 'min' => 1,
419 'max' => 80,
420 ],
421 ],
422 'selectors' => [
423 '{{WRAPPER}} .eael-contact-form' => 'max-width: {{SIZE}}{{UNIT}};',
424 ],
425 ]
426 );
427
428
429 $this->add_responsive_control(
430 'eael_contact_form_margin',
431 [
432 'label' => esc_html__( 'Form Margin', 'essential-addons-elementor' ),
433 'type' => Controls_Manager::DIMENSIONS,
434 'size_units' => [ 'px', 'em', '%' ],
435 'selectors' => [
436 '{{WRAPPER}} .eael-contact-form' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
437 ],
438 ]
439 );
440
441 $this->add_responsive_control(
442 'eael_contact_form_padding',
443 [
444 'label' => esc_html__( 'Form Padding', 'essential-addons-elementor' ),
445 'type' => Controls_Manager::DIMENSIONS,
446 'size_units' => [ 'px', 'em', '%' ],
447 'selectors' => [
448 '{{WRAPPER}} .eael-contact-form' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
449 ],
450 ]
451 );
452
453
454 $this->add_control(
455 'eael_contact_form_border_radius',
456 [
457 'label' => esc_html__( 'Border Radius', 'essential-addons-elementor' ),
458 'type' => Controls_Manager::DIMENSIONS,
459 'separator' => 'before',
460 'size_units' => [ 'px' ],
461 'selectors' => [
462 '{{WRAPPER}} .eael-contact-form' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
463 ],
464 ]
465 );
466
467
468 $this->add_group_control(
469 Group_Control_Border::get_type(),
470 [
471 'name' => 'eael_contact_form_border',
472 'selector' => '{{WRAPPER}} .eael-contact-form',
473 ]
474 );
475
476
477 $this->add_group_control(
478 Group_Control_Box_Shadow::get_type(),
479 [
480 'name' => 'eael_contact_form_box_shadow',
481 'selector' => '{{WRAPPER}} .eael-contact-form',
482 ]
483 );
484
485 $this->end_controls_section();
486
487 /**
488 * Style Tab: Labels
489 * -------------------------------------------------
490 */
491 $this->start_controls_section(
492 'section_label_style',
493 [
494 'label' => __( 'Labels', 'essential-addons-elementor' ),
495 'tab' => Controls_Manager::TAB_STYLE,
496 ]
497 );
498
499 $this->add_control(
500 'text_color_label',
501 [
502 'label' => __( 'Text Color', 'essential-addons-elementor' ),
503 'type' => Controls_Manager::COLOR,
504 'selectors' => [
505 '{{WRAPPER}} .eael-caldera-form .form-group label' => 'color: {{VALUE}}',
506 ],
507 ]
508 );
509
510 $this->add_group_control(
511 Group_Control_Typography::get_type(),
512 [
513 'name' => 'typography_label',
514 'label' => __( 'Typography', 'essential-addons-elementor' ),
515 'selector' => '{{WRAPPER}} .eael-caldera-form .form-group label',
516 ]
517 );
518
519 $this->end_controls_section();
520
521 /**
522 * Style Tab: Input & Textarea
523 * -------------------------------------------------
524 */
525 $this->start_controls_section(
526 'section_fields_style',
527 [
528 'label' => __( 'Input & Textarea', 'essential-addons-elementor' ),
529 'tab' => Controls_Manager::TAB_STYLE,
530 ]
531 );
532
533 $this->add_responsive_control(
534 'input_alignment',
535 [
536 'label' => __( 'Alignment', 'essential-addons-elementor' ),
537 'type' => Controls_Manager::CHOOSE,
538 'options' => [
539 'left' => [
540 'title' => __( 'Left', 'essential-addons-elementor' ),
541 'icon' => 'fa fa-align-left',
542 ],
543 'center' => [
544 'title' => __( 'Center', 'essential-addons-elementor' ),
545 'icon' => 'fa fa-align-center',
546 ],
547 'right' => [
548 'title' => __( 'Right', 'essential-addons-elementor' ),
549 'icon' => 'fa fa-align-right',
550 ],
551 ],
552 'default' => '',
553 'selectors' => [
554 '{{WRAPPER}} .eael-caldera-form input:not([type=radio]):not([type=checkbox]):not([type=submit]):not([type=button]):not([type=image]):not([type=file]), {{WRAPPER}} .eael-caldera-form .form-group textarea, {{WRAPPER}} .eael-caldera-form .form-group select' => 'text-align: {{VALUE}};',
555 ],
556 ]
557 );
558
559 $this->start_controls_tabs( 'tabs_fields_style' );
560
561 $this->start_controls_tab(
562 'tab_fields_normal',
563 [
564 'label' => __( 'Normal', 'essential-addons-elementor' ),
565 ]
566 );
567
568 $this->add_control(
569 'field_bg_color',
570 [
571 'label' => __( 'Background Color', 'essential-addons-elementor' ),
572 'type' => Controls_Manager::COLOR,
573 'default' => '',
574 'selectors' => [
575 '{{WRAPPER}} .eael-caldera-form input:not([type=radio]):not([type=checkbox]):not([type=submit]):not([type=button]):not([type=image]):not([type=file]), {{WRAPPER}} .eael-caldera-form .form-group textarea, {{WRAPPER}} .eael-caldera-form .form-group select' => 'background-color: {{VALUE}}',
576 ],
577 ]
578 );
579
580 $this->add_control(
581 'field_text_color',
582 [
583 'label' => __( 'Text Color', 'essential-addons-elementor' ),
584 'type' => Controls_Manager::COLOR,
585 'default' => '',
586 'selectors' => [
587 '{{WRAPPER}} .eael-caldera-form input:not([type=radio]):not([type=checkbox]):not([type=submit]):not([type=button]):not([type=image]):not([type=file]), {{WRAPPER}} .eael-caldera-form .form-group textarea, {{WRAPPER}} .eael-caldera-form .form-group select' => 'color: {{VALUE}}',
588 ],
589 ]
590 );
591
592 $this->add_group_control(
593 Group_Control_Border::get_type(),
594 [
595 'name' => 'field_border',
596 'label' => __( 'Border', 'essential-addons-elementor' ),
597 'placeholder' => '1px',
598 'default' => '1px',
599 'selector' => '{{WRAPPER}} .eael-caldera-form input:not([type=radio]):not([type=checkbox]):not([type=submit]):not([type=button]):not([type=image]):not([type=file]), {{WRAPPER}} .eael-caldera-form .form-group textarea, {{WRAPPER}} .eael-caldera-form .form-group select',
600 'separator' => 'before',
601 ]
602 );
603
604 $this->add_control(
605 'field_radius',
606 [
607 'label' => __( 'Border Radius', 'essential-addons-elementor' ),
608 'type' => Controls_Manager::DIMENSIONS,
609 'size_units' => [ 'px', 'em', '%' ],
610 'selectors' => [
611 '{{WRAPPER}} .eael-caldera-form input:not([type=radio]):not([type=checkbox]):not([type=submit]):not([type=button]):not([type=image]):not([type=file]), {{WRAPPER}} .eael-caldera-form .form-group textarea, {{WRAPPER}} .eael-caldera-form .form-group select' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
612 ],
613 ]
614 );
615
616 $this->add_responsive_control(
617 'field_text_indent',
618 [
619 'label' => __( 'Text Indent', 'essential-addons-elementor' ),
620 'type' => Controls_Manager::SLIDER,
621 'range' => [
622 'px' => [
623 'min' => 0,
624 'max' => 60,
625 'step' => 1,
626 ],
627 '%' => [
628 'min' => 0,
629 'max' => 30,
630 'step' => 1,
631 ],
632 ],
633 'size_units' => [ 'px', 'em', '%' ],
634 'selectors' => [
635 '{{WRAPPER}} .eael-caldera-form input:not([type=radio]):not([type=checkbox]):not([type=submit]):not([type=button]):not([type=image]):not([type=file]), {{WRAPPER}} .eael-caldera-form .form-group textarea, {{WRAPPER}} .eael-caldera-form .form-group select' => 'text-indent: {{SIZE}}{{UNIT}}',
636 ],
637 'separator' => 'before'
638 ]
639 );
640
641 $this->add_responsive_control(
642 'input_width',
643 [
644 'label' => __( 'Input Width', 'essential-addons-elementor' ),
645 'type' => Controls_Manager::SLIDER,
646 'range' => [
647 'px' => [
648 'min' => 0,
649 'max' => 1200,
650 'step' => 1,
651 ],
652 ],
653 'size_units' => [ 'px', 'em', '%' ],
654 'selectors' => [
655 '{{WRAPPER}} .eael-caldera-form input:not([type=radio]):not([type=checkbox]):not([type=submit]):not([type=button]):not([type=image]):not([type=file]), {{WRAPPER}} .eael-caldera-form .form-group select' => 'width: {{SIZE}}{{UNIT}}',
656 ],
657 ]
658 );
659
660 $this->add_responsive_control(
661 'input_height',
662 [
663 'label' => __( 'Input Height', 'essential-addons-elementor' ),
664 'type' => Controls_Manager::SLIDER,
665 'range' => [
666 'px' => [
667 'min' => 0,
668 'max' => 80,
669 'step' => 1,
670 ],
671 ],
672 'size_units' => [ 'px', 'em', '%' ],
673 'selectors' => [
674 '{{WRAPPER}} .eael-caldera-form input:not([type=radio]):not([type=checkbox]):not([type=submit]):not([type=button]):not([type=image]):not([type=file]), {{WRAPPER}} .eael-caldera-form .form-group select' => 'height: {{SIZE}}{{UNIT}}',
675 ],
676 ]
677 );
678
679 $this->add_responsive_control(
680 'textarea_width',
681 [
682 'label' => __( 'Textarea Width', 'essential-addons-elementor' ),
683 'type' => Controls_Manager::SLIDER,
684 'range' => [
685 'px' => [
686 'min' => 0,
687 'max' => 1200,
688 'step' => 1,
689 ],
690 ],
691 'size_units' => [ 'px', 'em', '%' ],
692 'selectors' => [
693 '{{WRAPPER}} .eael-caldera-form .form-group textarea' => 'width: {{SIZE}}{{UNIT}}',
694 ],
695 ]
696 );
697
698 $this->add_responsive_control(
699 'textarea_height',
700 [
701 'label' => __( 'Textarea Height', 'essential-addons-elementor' ),
702 'type' => Controls_Manager::SLIDER,
703 'range' => [
704 'px' => [
705 'min' => 0,
706 'max' => 400,
707 'step' => 1,
708 ],
709 ],
710 'size_units' => [ 'px', 'em', '%' ],
711 'selectors' => [
712 '{{WRAPPER}} .eael-caldera-form .form-group textarea' => 'height: {{SIZE}}{{UNIT}}',
713 ],
714 ]
715 );
716
717 $this->add_responsive_control(
718 'field_padding',
719 [
720 'label' => __( 'Padding', 'essential-addons-elementor' ),
721 'type' => Controls_Manager::DIMENSIONS,
722 'size_units' => [ 'px', 'em', '%' ],
723 'selectors' => [
724 '{{WRAPPER}} .eael-caldera-form input:not([type=radio]):not([type=checkbox]):not([type=submit]):not([type=button]):not([type=image]):not([type=file]), {{WRAPPER}} .eael-caldera-form .form-group textarea, {{WRAPPER}} .eael-caldera-form .form-group select' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
725 ],
726 ]
727 );
728
729 $this->add_responsive_control(
730 'field_spacing',
731 [
732 'label' => __( 'Spacing', 'essential-addons-elementor' ),
733 'type' => Controls_Manager::SLIDER,
734 'range' => [
735 'px' => [
736 'min' => 0,
737 'max' => 100,
738 'step' => 1,
739 ],
740 ],
741 'size_units' => [ 'px', 'em', '%' ],
742 'selectors' => [
743 '{{WRAPPER}} .eael-caldera-form .form-group' => 'margin-bottom: {{SIZE}}{{UNIT}}',
744 ],
745 ]
746 );
747
748 $this->add_group_control(
749 Group_Control_Typography::get_type(),
750 [
751 'name' => 'field_typography',
752 'label' => __( 'Typography', 'essential-addons-elementor' ),
753 'selector' => '{{WRAPPER}} .eael-caldera-form input:not([type=radio]):not([type=checkbox]):not([type=submit]):not([type=button]):not([type=image]):not([type=file]), {{WRAPPER}} .eael-caldera-form .form-group textarea, {{WRAPPER}} .eael-caldera-form .form-group select',
754 'separator' => 'before',
755 ]
756 );
757
758 $this->add_group_control(
759 Group_Control_Box_Shadow::get_type(),
760 [
761 'name' => 'field_box_shadow',
762 'selector' => '{{WRAPPER}} .eael-caldera-form input:not([type=radio]):not([type=checkbox]):not([type=submit]):not([type=button]):not([type=image]):not([type=file]), {{WRAPPER}} .eael-caldera-form .form-group textarea, {{WRAPPER}} .eael-caldera-form .form-group select',
763 'separator' => 'before',
764 ]
765 );
766
767 $this->end_controls_tab();
768
769 $this->start_controls_tab(
770 'tab_fields_focus',
771 [
772 'label' => __( 'Focus', 'essential-addons-elementor' ),
773 ]
774 );
775
776 $this->add_control(
777 'field_bg_color_focus',
778 [
779 'label' => __( 'Background Color', 'essential-addons-elementor' ),
780 'type' => Controls_Manager::COLOR,
781 'default' => '',
782 'selectors' => [
783 '{{WRAPPER}} .eael-caldera-form input:not([type=radio]):not([type=checkbox]):not([type=submit]):not([type=button]):not([type=image]):not([type=file]):focus, {{WRAPPER}} .eael-caldera-form .form-group textarea:focus' => 'background-color: {{VALUE}}',
784 ],
785 ]
786 );
787
788 $this->add_group_control(
789 Group_Control_Border::get_type(),
790 [
791 'name' => 'focus_input_border',
792 'label' => __( 'Border', 'essential-addons-elementor' ),
793 'placeholder' => '1px',
794 'default' => '1px',
795 'selector' => '{{WRAPPER}} .eael-caldera-form input:not([type=radio]):not([type=checkbox]):not([type=submit]):not([type=button]):not([type=image]):not([type=file]):focus, {{WRAPPER}} .eael-caldera-form .form-group textarea:focus',
796 ]
797 );
798
799 $this->add_group_control(
800 Group_Control_Box_Shadow::get_type(),
801 [
802 'name' => 'focus_box_shadow',
803 'selector' => '{{WRAPPER}} .eael-caldera-form input:not([type=radio]):not([type=checkbox]):not([type=submit]):not([type=button]):not([type=image]):not([type=file]):focus, {{WRAPPER}} .eael-caldera-form .form-group textarea:focus',
804 'separator' => 'before',
805 ]
806 );
807
808 $this->end_controls_tab();
809
810 $this->end_controls_tabs();
811
812 $this->end_controls_section();
813
814 /**
815 * Style Tab: Field Description
816 * -------------------------------------------------
817 */
818 $this->start_controls_section(
819 'section_field_description_style',
820 [
821 'label' => __( 'Field Description', 'essential-addons-elementor' ),
822 'tab' => Controls_Manager::TAB_STYLE,
823 ]
824 );
825
826 $this->add_control(
827 'field_description_text_color',
828 [
829 'label' => __( 'Text Color', 'essential-addons-elementor' ),
830 'type' => Controls_Manager::COLOR,
831 'selectors' => [
832 '{{WRAPPER}} .eael-caldera-form .help-block' => 'color: {{VALUE}}',
833 ],
834 ]
835 );
836
837 $this->add_group_control(
838 Group_Control_Typography::get_type(),
839 [
840 'name' => 'field_description_typography',
841 'label' => __( 'Typography', 'essential-addons-elementor' ),
842 'selector' => '{{WRAPPER}} .eael-caldera-form .help-block',
843 ]
844 );
845
846 $this->add_responsive_control(
847 'field_description_spacing',
848 [
849 'label' => __( 'Spacing', 'essential-addons-elementor' ),
850 'type' => Controls_Manager::SLIDER,
851 'range' => [
852 'px' => [
853 'min' => 0,
854 'max' => 100,
855 'step' => 1,
856 ],
857 ],
858 'size_units' => [ 'px', 'em', '%' ],
859 'selectors' => [
860 '{{WRAPPER}} .eael-caldera-form .help-block' => 'padding-top: {{SIZE}}{{UNIT}}',
861 ],
862 ]
863 );
864
865 $this->end_controls_section();
866
867 /**
868 * Style Tab: Placeholder
869 * -------------------------------------------------
870 */
871 $this->start_controls_section(
872 'section_placeholder_style',
873 [
874 'label' => __( 'Placeholder', 'essential-addons-elementor' ),
875 'tab' => Controls_Manager::TAB_STYLE,
876 'condition' => [
877 'placeholder_switch' => 'yes',
878 ],
879 ]
880 );
881
882 $this->add_control(
883 'text_color_placeholder',
884 [
885 'label' => __( 'Text Color', 'essential-addons-elementor' ),
886 'type' => Controls_Manager::COLOR,
887 'selectors' => [
888 '{{WRAPPER}} .eael-caldera-form .form-group input::-webkit-input-placeholder, {{WRAPPER}} .eael-caldera-form .form-group textarea::-webkit-input-placeholder' => 'color: {{VALUE}}',
889 ],
890 'condition' => [
891 'placeholder_switch' => 'yes',
892 ],
893 ]
894 );
895
896 $this->end_controls_section();
897
898 /**
899 * Style Tab: Radio & Checkbox
900 * -------------------------------------------------
901 */
902 $this->start_controls_section(
903 'section_radio_checkbox_style',
904 [
905 'label' => __( 'Radio & Checkbox', 'essential-addons-elementor' ),
906 'tab' => Controls_Manager::TAB_STYLE,
907 ]
908 );
909
910 $this->add_control(
911 'custom_radio_checkbox',
912 [
913 'label' => __( 'Custom Styles', 'essential-addons-elementor' ),
914 'type' => Controls_Manager::SWITCHER,
915 'label_on' => __( 'Yes', 'essential-addons-elementor' ),
916 'label_off' => __( 'No', 'essential-addons-elementor' ),
917 'return_value' => 'yes',
918 ]
919 );
920
921 $this->add_responsive_control(
922 'radio_checkbox_size',
923 [
924 'label' => __( 'Size', 'essential-addons-elementor' ),
925 'type' => Controls_Manager::SLIDER,
926 'default' => [
927 'size' => '15',
928 'unit' => 'px'
929 ],
930 'range' => [
931 'px' => [
932 'min' => 0,
933 'max' => 80,
934 'step' => 1,
935 ],
936 ],
937 'size_units' => [ 'px', 'em', '%' ],
938 'selectors' => [
939 '{{WRAPPER}} .eael-custom-radio-checkbox input[type="checkbox"], {{WRAPPER}} .eael-custom-radio-checkbox input[type="radio"]' => 'width: {{SIZE}}{{UNIT}}; height: {{SIZE}}{{UNIT}}',
940 ],
941 'condition' => [
942 'custom_radio_checkbox' => 'yes',
943 ],
944 ]
945 );
946
947 $this->start_controls_tabs( 'tabs_radio_checkbox_style' );
948
949 $this->start_controls_tab(
950 'radio_checkbox_normal',
951 [
952 'label' => __( 'Normal', 'essential-addons-elementor' ),
953 'condition' => [
954 'custom_radio_checkbox' => 'yes',
955 ],
956 ]
957 );
958
959 $this->add_control(
960 'radio_checkbox_color',
961 [
962 'label' => __( 'Color', 'essential-addons-elementor' ),
963 'type' => Controls_Manager::COLOR,
964 'default' => '',
965 'selectors' => [
966 '{{WRAPPER}} .eael-custom-radio-checkbox input[type="checkbox"], {{WRAPPER}} .eael-custom-radio-checkbox input[type="radio"]' => 'background: {{VALUE}}',
967 ],
968 'condition' => [
969 'custom_radio_checkbox' => 'yes',
970 ],
971 ]
972 );
973
974 $this->add_responsive_control(
975 'checkbox_border_width',
976 [
977 'label' => __( 'Border Width', 'essential-addons-elementor' ),
978 'type' => Controls_Manager::SLIDER,
979 'range' => [
980 'px' => [
981 'min' => 0,
982 'max' => 15,
983 'step' => 1,
984 ],
985 ],
986 'size_units' => [ 'px' ],
987 'selectors' => [
988 '{{WRAPPER}} .eael-custom-radio-checkbox input[type="checkbox"], {{WRAPPER}} .eael-custom-radio-checkbox input[type="radio"]' => 'border-width: {{SIZE}}{{UNIT}}',
989 ],
990 'condition' => [
991 'custom_radio_checkbox' => 'yes',
992 ],
993 ]
994 );
995
996 $this->add_control(
997 'checkbox_border_color',
998 [
999 'label' => __( 'Border Color', 'essential-addons-elementor' ),
1000 'type' => Controls_Manager::COLOR,
1001 'default' => '',
1002 'selectors' => [
1003 '{{WRAPPER}} .eael-custom-radio-checkbox input[type="checkbox"], {{WRAPPER}} .eael-custom-radio-checkbox input[type="radio"]' => 'border-color: {{VALUE}}',
1004 ],
1005 'condition' => [
1006 'custom_radio_checkbox' => 'yes',
1007 ],
1008 ]
1009 );
1010
1011 $this->add_control(
1012 'checkbox_heading',
1013 [
1014 'label' => __( 'Checkbox', 'essential-addons-elementor' ),
1015 'type' => Controls_Manager::HEADING,
1016 'condition' => [
1017 'custom_radio_checkbox' => 'yes',
1018 ],
1019 ]
1020 );
1021
1022 $this->add_control(
1023 'checkbox_border_radius',
1024 [
1025 'label' => __( 'Border Radius', 'essential-addons-elementor' ),
1026 'type' => Controls_Manager::DIMENSIONS,
1027 'size_units' => [ 'px', 'em', '%' ],
1028 'selectors' => [
1029 '{{WRAPPER}} .eael-custom-radio-checkbox input[type="checkbox"], {{WRAPPER}} .eael-custom-radio-checkbox input[type="checkbox"]:before' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1030 ],
1031 'condition' => [
1032 'custom_radio_checkbox' => 'yes',
1033 ],
1034 ]
1035 );
1036
1037 $this->add_control(
1038 'radio_heading',
1039 [
1040 'label' => __( 'Radio Buttons', 'essential-addons-elementor' ),
1041 'type' => Controls_Manager::HEADING,
1042 'condition' => [
1043 'custom_radio_checkbox' => 'yes',
1044 ],
1045 ]
1046 );
1047
1048 $this->add_control(
1049 'radio_border_radius',
1050 [
1051 'label' => __( 'Border Radius', 'essential-addons-elementor' ),
1052 'type' => Controls_Manager::DIMENSIONS,
1053 'size_units' => [ 'px', 'em', '%' ],
1054 'selectors' => [
1055 '{{WRAPPER}} .eael-custom-radio-checkbox input[type="radio"], {{WRAPPER}} .eael-custom-radio-checkbox input[type="radio"]:before' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1056 ],
1057 'condition' => [
1058 'custom_radio_checkbox' => 'yes',
1059 ],
1060 ]
1061 );
1062
1063 $this->end_controls_tab();
1064
1065 $this->start_controls_tab(
1066 'radio_checkbox_checked',
1067 [
1068 'label' => __( 'Checked', 'essential-addons-elementor' ),
1069 'condition' => [
1070 'custom_radio_checkbox' => 'yes',
1071 ],
1072 ]
1073 );
1074
1075 $this->add_control(
1076 'radio_checkbox_color_checked',
1077 [
1078 'label' => __( 'Color', 'essential-addons-elementor' ),
1079 'type' => Controls_Manager::COLOR,
1080 'default' => '',
1081 'selectors' => [
1082 '{{WRAPPER}} .eael-custom-radio-checkbox input[type="checkbox"]:checked:before, {{WRAPPER}} .eael-custom-radio-checkbox input[type="radio"]:checked:before' => 'background: {{VALUE}}',
1083 ],
1084 'condition' => [
1085 'custom_radio_checkbox' => 'yes',
1086 ],
1087 ]
1088 );
1089
1090 $this->end_controls_tab();
1091
1092 $this->end_controls_tabs();
1093
1094 $this->end_controls_section();
1095
1096 /**
1097 * Style Tab: Submit Button
1098 * -------------------------------------------------
1099 */
1100 $this->start_controls_section(
1101 'section_submit_button_style',
1102 [
1103 'label' => __( 'Submit Button', 'essential-addons-elementor' ),
1104 'tab' => Controls_Manager::TAB_STYLE,
1105 ]
1106 );
1107
1108 $this->add_responsive_control(
1109 'button_align',
1110 [
1111 'label' => __( 'Alignment', 'essential-addons-elementor' ),
1112 'type' => Controls_Manager::CHOOSE,
1113 'options' => [
1114 'left' => [
1115 'title' => __( 'Left', 'essential-addons-elementor' ),
1116 'icon' => 'eicon-h-align-left',
1117 ],
1118 'center' => [
1119 'title' => __( 'Center', 'essential-addons-elementor' ),
1120 'icon' => 'eicon-h-align-center',
1121 ],
1122 'right' => [
1123 'title' => __( 'Right', 'essential-addons-elementor' ),
1124 'icon' => 'eicon-h-align-right',
1125 ],
1126 ],
1127 'default' => '',
1128 'prefix_class' => 'eael-caldera-form-button-',
1129 'condition' => [
1130 'button_width_type' => 'custom',
1131 ],
1132 ]
1133 );
1134
1135 $this->add_control(
1136 'button_width_type',
1137 [
1138 'label' => __( 'Width', 'essential-addons-elementor' ),
1139 'type' => Controls_Manager::SELECT,
1140 'default' => 'custom',
1141 'options' => [
1142 'full-width' => __( 'Full Width', 'essential-addons-elementor' ),
1143 'custom' => __( 'Custom', 'essential-addons-elementor' ),
1144 ],
1145 'prefix_class' => 'eael-caldera-form-button-',
1146 ]
1147 );
1148
1149 $this->add_responsive_control(
1150 'button_width',
1151 [
1152 'label' => __( 'Width', 'essential-addons-elementor' ),
1153 'type' => Controls_Manager::SLIDER,
1154 'range' => [
1155 'px' => [
1156 'min' => 0,
1157 'max' => 1200,
1158 'step' => 1,
1159 ],
1160 ],
1161 'size_units' => [ 'px', '%' ],
1162 'selectors' => [
1163 '{{WRAPPER}} .eael-caldera-form .form-group input[type="submit"], {{WRAPPER}} .eael-caldera-form .form-group input[type="button"]' => 'width: {{SIZE}}{{UNIT}}',
1164 ],
1165 'condition' => [
1166 'button_width_type' => 'custom',
1167 ],
1168 ]
1169 );
1170
1171 $this->start_controls_tabs( 'tabs_button_style' );
1172
1173 $this->start_controls_tab(
1174 'tab_button_normal',
1175 [
1176 'label' => __( 'Normal', 'essential-addons-elementor' ),
1177 ]
1178 );
1179
1180 $this->add_control(
1181 'button_bg_color_normal',
1182 [
1183 'label' => __( 'Background Color', 'essential-addons-elementor' ),
1184 'type' => Controls_Manager::COLOR,
1185 'default' => '',
1186 'selectors' => [
1187 '{{WRAPPER}} .eael-caldera-form .form-group input[type="submit"], {{WRAPPER}} .eael-caldera-form .form-group input[type="button"]' => 'background-color: {{VALUE}}',
1188 ],
1189 ]
1190 );
1191
1192 $this->add_control(
1193 'button_text_color_normal',
1194 [
1195 'label' => __( 'Text Color', 'essential-addons-elementor' ),
1196 'type' => Controls_Manager::COLOR,
1197 'default' => '',
1198 'selectors' => [
1199 '{{WRAPPER}} .eael-caldera-form .form-group input[type="submit"], {{WRAPPER}} .eael-caldera-form .form-group input[type="button"]' => 'color: {{VALUE}}',
1200 ],
1201 ]
1202 );
1203
1204 $this->add_group_control(
1205 Group_Control_Border::get_type(),
1206 [
1207 'name' => 'button_border_normal',
1208 'label' => __( 'Border', 'essential-addons-elementor' ),
1209 'placeholder' => '1px',
1210 'default' => '1px',
1211 'selector' => '{{WRAPPER}} .eael-caldera-form .form-group input[type="submit"], {{WRAPPER}} .eael-caldera-form .form-group input[type="button"]',
1212 ]
1213 );
1214
1215 $this->add_control(
1216 'button_border_radius',
1217 [
1218 'label' => __( 'Border Radius', 'essential-addons-elementor' ),
1219 'type' => Controls_Manager::DIMENSIONS,
1220 'size_units' => [ 'px', 'em', '%' ],
1221 'selectors' => [
1222 '{{WRAPPER}} .eael-caldera-form .form-group input[type="submit"], {{WRAPPER}} .eael-caldera-form .form-group input[type="button"]' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1223 ],
1224 ]
1225 );
1226
1227 $this->add_responsive_control(
1228 'button_padding',
1229 [
1230 'label' => __( 'Padding', 'essential-addons-elementor' ),
1231 'type' => Controls_Manager::DIMENSIONS,
1232 'size_units' => [ 'px', 'em', '%' ],
1233 'selectors' => [
1234 '{{WRAPPER}} .eael-caldera-form .form-group input[type="submit"], {{WRAPPER}} .eael-caldera-form .form-group input[type="button"]' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1235 ],
1236 ]
1237 );
1238
1239 $this->add_responsive_control(
1240 'button_margin',
1241 [
1242 'label' => __( 'Margin Top', 'essential-addons-elementor' ),
1243 'type' => Controls_Manager::SLIDER,
1244 'range' => [
1245 'px' => [
1246 'min' => 0,
1247 'max' => 100,
1248 'step' => 1,
1249 ],
1250 ],
1251 'size_units' => [ 'px', 'em', '%' ],
1252 'selectors' => [
1253 '{{WRAPPER}} .eael-caldera-form .form-group input[type="submit"], {{WRAPPER}} .eael-caldera-form .form-group input[type="button"]' => 'margin-top: {{SIZE}}{{UNIT}}',
1254 ],
1255 ]
1256 );
1257
1258 $this->add_group_control(
1259 Group_Control_Typography::get_type(),
1260 [
1261 'name' => 'button_typography',
1262 'label' => __( 'Typography', 'essential-addons-elementor' ),
1263 'selector' => '{{WRAPPER}} .eael-caldera-form .form-group input[type="submit"], {{WRAPPER}} .eael-caldera-form .form-group input[type="button"]',
1264 'separator' => 'before',
1265 ]
1266 );
1267
1268 $this->add_group_control(
1269 Group_Control_Box_Shadow::get_type(),
1270 [
1271 'name' => 'button_box_shadow',
1272 'selector' => '{{WRAPPER}} .eael-caldera-form .form-group input[type="submit"], {{WRAPPER}} .eael-caldera-form .form-group input[type="button"]',
1273 'separator' => 'before',
1274 ]
1275 );
1276
1277 $this->end_controls_tab();
1278
1279 $this->start_controls_tab(
1280 'tab_button_hover',
1281 [
1282 'label' => __( 'Hover', 'essential-addons-elementor' ),
1283 ]
1284 );
1285
1286 $this->add_control(
1287 'button_bg_color_hover',
1288 [
1289 'label' => __( 'Background Color', 'essential-addons-elementor' ),
1290 'type' => Controls_Manager::COLOR,
1291 'default' => '',
1292 'selectors' => [
1293 '{{WRAPPER}} .eael-caldera-form .form-group input[type="submit"]:hover, {{WRAPPER}} .eael-caldera-form .form-group input[type="button"]:hover' => 'background-color: {{VALUE}}',
1294 ],
1295 ]
1296 );
1297
1298 $this->add_control(
1299 'button_text_color_hover',
1300 [
1301 'label' => __( 'Text Color', 'essential-addons-elementor' ),
1302 'type' => Controls_Manager::COLOR,
1303 'default' => '',
1304 'selectors' => [
1305 '{{WRAPPER}} .eael-caldera-form .form-group input[type="submit"]:hover, {{WRAPPER}} .eael-caldera-form .form-group input[type="button"]:hover' => 'color: {{VALUE}}',
1306 ],
1307 ]
1308 );
1309
1310 $this->add_control(
1311 'button_border_color_hover',
1312 [
1313 'label' => __( 'Border Color', 'essential-addons-elementor' ),
1314 'type' => Controls_Manager::COLOR,
1315 'default' => '',
1316 'selectors' => [
1317 '{{WRAPPER}} .eael-caldera-form .form-group input[type="submit"]:hover, {{WRAPPER}} .eael-caldera-form .form-group input[type="button"]:hover' => 'border-color: {{VALUE}}',
1318 ],
1319 ]
1320 );
1321
1322 $this->end_controls_tab();
1323
1324 $this->end_controls_tabs();
1325
1326 $this->end_controls_section();
1327
1328 /**
1329 * Style Tab: Success Message
1330 * -------------------------------------------------
1331 */
1332 $this->start_controls_section(
1333 'section_success_message_style',
1334 [
1335 'label' => __( 'Success Message', 'essential-addons-elementor' ),
1336 'tab' => Controls_Manager::TAB_STYLE,
1337 ]
1338 );
1339
1340 $this->add_control(
1341 'success_message_bg_color',
1342 [
1343 'label' => __( 'Background Color', 'essential-addons-elementor' ),
1344 'type' => Controls_Manager::COLOR,
1345 'selectors' => [
1346 '{{WRAPPER}} .eael-caldera-form .caldera-grid .alert-success' => 'background-color: {{VALUE}}',
1347 ],
1348 ]
1349 );
1350
1351 $this->add_control(
1352 'success_message_text_color',
1353 [
1354 'label' => __( 'Text Color', 'essential-addons-elementor' ),
1355 'type' => Controls_Manager::COLOR,
1356 'selectors' => [
1357 '{{WRAPPER}} .eael-caldera-form .caldera-grid .alert-success' => 'color: {{VALUE}}',
1358 ],
1359 ]
1360 );
1361
1362 $this->add_group_control(
1363 Group_Control_Border::get_type(),
1364 [
1365 'name' => 'success_message_border',
1366 'label' => __( 'Border', 'essential-addons-elementor' ),
1367 'placeholder' => '1px',
1368 'default' => '1px',
1369 'selector' => '{{WRAPPER}} .eael-caldera-form .caldera-grid .alert-success',
1370 ]
1371 );
1372
1373 $this->add_group_control(
1374 Group_Control_Typography::get_type(),
1375 [
1376 'name' => 'success_message_typography',
1377 'label' => __( 'Typography', 'essential-addons-elementor' ),
1378 'selector' => '{{WRAPPER}} .eael-caldera-form .caldera-grid .alert-success',
1379 ]
1380 );
1381
1382 $this->end_controls_section();
1383
1384 /**
1385 * Style Tab: Errors
1386 * -------------------------------------------------
1387 */
1388 $this->start_controls_section(
1389 'section_error_style',
1390 [
1391 'label' => __( 'Errors', 'essential-addons-elementor' ),
1392 'tab' => Controls_Manager::TAB_STYLE,
1393 ]
1394 );
1395
1396 $this->add_control(
1397 'error_messages_heading',
1398 [
1399 'label' => __( 'Error Messages', 'essential-addons-elementor' ),
1400 'type' => Controls_Manager::HEADING,
1401 'condition' => [
1402 'error_messages' => 'show',
1403 ],
1404 ]
1405 );
1406
1407 $this->add_control(
1408 'error_message_text_color',
1409 [
1410 'label' => __( 'Color', 'essential-addons-elementor' ),
1411 'type' => Controls_Manager::COLOR,
1412 'default' => '',
1413 'selectors' => [
1414 '{{WRAPPER}} .eael-caldera-form .has-error .help-block' => 'color: {{VALUE}}',
1415 ],
1416 'condition' => [
1417 'error_messages' => 'show',
1418 ],
1419 ]
1420 );
1421
1422 $this->add_control(
1423 'error_fields_heading',
1424 [
1425 'label' => __( 'Error Fields', 'essential-addons-elementor' ),
1426 'type' => Controls_Manager::HEADING,
1427 'separator' => 'before',
1428 ]
1429 );
1430
1431 $this->add_control(
1432 'error_fields_label_color',
1433 [
1434 'label' => __( 'Label Color', 'essential-addons-elementor' ),
1435 'type' => Controls_Manager::COLOR,
1436 'default' => '',
1437 'selectors' => [
1438 '{{WRAPPER}} .eael-caldera-form .has-error .control-label' => 'color: {{VALUE}}',
1439 ],
1440 ]
1441 );
1442
1443 $this->add_group_control(
1444 Group_Control_Border::get_type(),
1445 [
1446 'name' => 'error_field_border',
1447 'label' => __( 'Input Border', 'essential-addons-elementor' ),
1448 'placeholder' => '1px',
1449 'default' => '1px',
1450 'selector' => '{{WRAPPER}} .eael-caldera-form .has-error input:not([type=radio]):not([type=checkbox]):not([type=submit]):not([type=button]):not([type=image]):not([type=file]), {{WRAPPER}} .eael-caldera-form .has-error textarea',
1451 ]
1452 );
1453
1454 $this->end_controls_section();
1455
1456 }
1457
1458 protected function render() {
1459 $settings = $this->get_settings();
1460
1461 $this->add_render_attribute( 'contact-form', 'class', [
1462 'eael-contact-form',
1463 'eael-caldera-form',
1464 ]
1465 );
1466
1467 if ( $settings['placeholder_switch'] != 'yes' ) {
1468 $this->add_render_attribute( 'contact-form', 'class', 'placeholder-hide' );
1469 }
1470
1471 if ( $settings['custom_title_description'] == 'yes' ) {
1472 $this->add_render_attribute( 'contact-form', 'class', 'title-description-hide' );
1473 }
1474
1475 if ( $settings['custom_radio_checkbox'] == 'yes' ) {
1476 $this->add_render_attribute( 'contact-form', 'class', 'eael-custom-radio-checkbox' );
1477 }
1478 if ( $settings['eael_contact_form_alignment'] == 'left' ) {
1479 $this->add_render_attribute( 'contact-form', 'class', 'eael-contact-form-align-left' );
1480 }
1481 elseif ( $settings['eael_contact_form_alignment'] == 'center' ) {
1482 $this->add_render_attribute( 'contact-form', 'class', 'eael-contact-form-align-center' );
1483 }
1484 elseif ( $settings['eael_contact_form_alignment'] == 'right' ) {
1485 $this->add_render_attribute( 'contact-form', 'class', 'eael-contact-form-align-right' );
1486 }
1487 else {
1488 $this->add_render_attribute( 'contact-form', 'class', 'eael-contact-form-align-default' );
1489 }
1490 if ( class_exists( 'Caldera_Forms' ) ) {
1491 if ( ! empty( $settings['contact_form_list'] ) ) { ?>
1492 <div <?php echo $this->get_render_attribute_string( 'contact-form' ); ?>>
1493 <?php if ( $settings['custom_title_description'] == 'yes' ) { ?>
1494 <div class="eael-caldera-form-heading">
1495 <?php if ( $settings['form_title_custom'] != '' ) { ?>
1496 <h3 class="eael-contact-form-title eael-caldera-form-title">
1497 <?php echo esc_attr( $settings['form_title_custom'] ); ?>
1498 </h3>
1499 <?php } ?>
1500 <?php if ( $settings['form_description_custom'] != '' ) { ?>
1501 <div class="eael-contact-form-description eael-caldera-form-description">
1502 <?php echo $this->parse_text_editor( $settings['form_description_custom'] ); ?>
1503 </div>
1504 <?php } ?>
1505 </div>
1506 <?php } ?>
1507 <?php
1508 $eael_form_id = $settings['contact_form_list'];
1509
1510 echo do_shortcode( '[caldera_form id="' . $eael_form_id . '" ]' );
1511 ?>
1512 </div>
1513 <?php
1514 }
1515 }
1516 }
1517
1518 protected function _content_template() {}
1519
1520 }
1521