PluginProbe ʕ •ᴥ•ʔ
Essential Addons for Elementor – Popular Elementor Templates & Widgets / 6.6.4
Essential Addons for Elementor – Popular Elementor Templates & Widgets v6.6.4
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 / includes / Elements / Caldera_Forms.php
essential-addons-for-elementor-lite / includes / Elements Last commit date
Adv_Accordion.php 1 month ago Adv_Tabs.php 1 month ago Advanced_Data_Table.php 3 months ago Better_Payment.php 4 years ago Betterdocs_Category_Box.php 2 months ago Betterdocs_Category_Grid.php 2 months ago Betterdocs_Search_Form.php 2 months ago Breadcrumbs.php 1 month ago Business_Reviews.php 2 months ago Caldera_Forms.php 1 month ago Career_Page.php 4 years ago Code_Snippet.php 3 months ago Contact_Form_7.php 1 month ago Content_Ticker.php 3 months ago Countdown.php 1 month ago Creative_Button.php 1 month ago Cta_Box.php 1 month ago Data_Table.php 1 month ago Dual_Color_Header.php 1 month ago EmbedPress.php 4 years ago Event_Calendar.php 2 months ago Facebook_Feed.php 3 months ago Fancy_Text.php 1 month ago Feature_List.php 3 months ago Filterable_Gallery.php 1 month ago Flip_Box.php 1 month ago FluentForm.php 1 month ago Formstack.php 1 month ago GravityForms.php 1 month ago Image_Accordion.php 1 month ago Info_Box.php 1 month ago Interactive_Circle.php 1 month ago Login_Register.php 3 weeks ago NFT_Gallery.php 3 months ago NinjaForms.php 1 month ago Post_Grid.php 3 months ago Post_Timeline.php 9 months ago Pricing_Table.php 1 month ago Product_Grid.php 3 months ago Progress_Bar.php 1 month ago SVG_Draw.php 3 months ago Simple_Menu.php 2 months ago Sticky_Video.php 3 months ago Team_Member.php 3 months ago Testimonial.php 1 month ago Tooltip.php 1 month ago Twitter_Feed.php 3 months ago TypeForm.php 5 months ago WeForms.php 1 year ago Woo_Add_To_Cart.php 1 month ago Woo_Cart.php 3 months ago Woo_Checkout.php 3 months ago Woo_Product_Carousel.php 3 months ago Woo_Product_Compare.php 1 year ago Woo_Product_Gallery.php 3 months ago Woo_Product_Images.php 1 month ago Woo_Product_List.php 1 month ago Woo_Product_Price.php 1 month ago Woo_Product_Rating.php 1 month ago WpForms.php 1 month ago index.php 3 years ago
Caldera_Forms.php
1550 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;
10 use \Elementor\Group_Control_Border;
11 use \Elementor\Group_Control_Box_Shadow;
12 use \Elementor\Group_Control_Typography;
13 use \Elementor\Core\Kits\Documents\Tabs\Global_Typography;
14 use \Elementor\Widget_Base;
15 use \Essential_Addons_Elementor\Classes\Helper;
16
17 class Caldera_Forms extends Widget_Base
18 {
19
20 public function get_name()
21 {
22 return 'eael-caldera-form';
23 }
24
25 public function get_title()
26 {
27 return __('Caldera Forms', 'essential-addons-for-elementor-lite');
28 }
29
30 public function get_categories()
31 {
32 return ['essential-addons-elementor'];
33 }
34
35 public function get_icon()
36 {
37 return 'eaicon-caldera-forms';
38 }
39
40 public function get_keywords() {
41 return [
42 'contact form',
43 'ea contact form',
44 'form styler',
45 'elementor form',
46 'feedback',
47 'calderaforms',
48 'ea calderaforms',
49 'ea',
50 'essential addons'
51 ];
52 }
53
54 public function has_widget_inner_wrapper(): bool {
55 return ! Helper::eael_e_optimized_markup();
56 }
57
58 public function get_custom_help_url() {
59 return 'https://essential-addons.com/elementor/docs/caldera-forms/';
60 }
61
62 protected function register_controls()
63 {
64 /*-----------------------------------------------------------------------------------*/
65 /* Content Tab
66 /*-----------------------------------------------------------------------------------*/
67 if ( ! class_exists( '\Caldera_Forms' ) ) {
68 $this->start_controls_section(
69 'eael_global_warning',
70 [
71 'label' => __( 'Warning!', 'essential-addons-for-elementor-lite'),
72 ]
73 );
74
75 $this->add_control(
76 'eael_global_warning_text',
77 [
78 'type' => Controls_Manager::RAW_HTML,
79 'raw' => __( '<strong>Caldera Forms</strong> has been closed as of April 5, 2022 and is not available for download. You can try the other Form plugins instead', 'essential-addons-for-elementor-lite'),
80 'content_classes' => 'eael-warning',
81 ]
82 );
83
84 $this->end_controls_section();
85 } else {
86 /**
87 * Content Tab: Caldera Forms
88 * -------------------------------------------------
89 */
90 $this->start_controls_section(
91 'section_info_box',
92 [
93 'label' => __('Caldera Forms', 'essential-addons-for-elementor-lite'),
94 ]
95 );
96
97 $this->add_control(
98 'contact_form_list',
99 [
100 'label' => esc_html__('Caldera Form', 'essential-addons-for-elementor-lite'),
101 'type' => Controls_Manager::SELECT,
102 'label_block' => true,
103 'options' => Helper::get_caldera_form_list(),
104 'default' => '0',
105 ]
106 );
107
108 $this->add_control(
109 'custom_title_description',
110 [
111 'label' => __('Custom Title & Description', 'essential-addons-for-elementor-lite'),
112 'type' => Controls_Manager::SWITCHER,
113 'label_on' => __('Yes', 'essential-addons-for-elementor-lite'),
114 'label_off' => __('No', 'essential-addons-for-elementor-lite'),
115 'return_value' => 'yes',
116 ]
117 );
118
119 $this->add_control(
120 'form_title_custom',
121 [
122 'label' => esc_html__('Title', 'essential-addons-for-elementor-lite'),
123 'type' => Controls_Manager::TEXT,
124 'dynamic' => [
125 'active' => true,
126 ],
127 'label_block' => true,
128 'default' => '',
129 'condition' => [
130 'custom_title_description' => 'yes',
131 ],
132 'ai' => [
133 'active' => true,
134 ],
135 ]
136 );
137
138 $this->add_control(
139 'form_description_custom',
140 [
141 'label' => esc_html__('Description', 'essential-addons-for-elementor-lite'),
142 'type' => Controls_Manager::TEXTAREA,
143 'dynamic' => [
144 'active' => true,
145 ],
146 'default' => '',
147 'condition' => [
148 'custom_title_description' => 'yes',
149 ],
150 ]
151 );
152
153 $this->add_control(
154 'labels_switch',
155 [
156 'label' => __('Labels', 'essential-addons-for-elementor-lite'),
157 'type' => Controls_Manager::SWITCHER,
158 'default' => 'yes',
159 'label_on' => __('Show', 'essential-addons-for-elementor-lite'),
160 'label_off' => __('Hide', 'essential-addons-for-elementor-lite'),
161 'return_value' => 'yes',
162 'prefix_class' => 'eael-caldera-form-labels-',
163 ]
164 );
165
166 $this->add_control(
167 'placeholder_switch',
168 [
169 'label' => __('Placeholder', 'essential-addons-for-elementor-lite'),
170 'type' => Controls_Manager::SWITCHER,
171 'default' => 'yes',
172 'label_on' => __('Show', 'essential-addons-for-elementor-lite'),
173 'label_off' => __('Hide', 'essential-addons-for-elementor-lite'),
174 'return_value' => 'yes',
175 ]
176 );
177
178 $this->end_controls_section();
179
180 /**
181 * Content Tab: Errors
182 * -------------------------------------------------
183 */
184 $this->start_controls_section(
185 'section_errors',
186 [
187 'label' => __('Errors', 'essential-addons-for-elementor-lite'),
188 ]
189 );
190
191 $this->add_control(
192 'error_messages',
193 [
194 'label' => __('Error Messages', 'essential-addons-for-elementor-lite'),
195 'type' => Controls_Manager::SELECT,
196 'default' => 'show',
197 'options' => [
198 'show' => __('Show', 'essential-addons-for-elementor-lite'),
199 'hide' => __('Hide', 'essential-addons-for-elementor-lite'),
200 ],
201 'selectors_dictionary' => [
202 'show' => 'block',
203 'hide' => 'none',
204 ],
205 'selectors' => [
206 '{{WRAPPER}} .eael-caldera-form .has-error .parsley-required' => 'display: {{VALUE}} !important;',
207 ],
208 ]
209 );
210
211 $this->end_controls_section();
212 }
213
214 /*-----------------------------------------------------------------------------------*/
215 /* Style Tab
216 /*-----------------------------------------------------------------------------------*/
217
218 /**
219 * Style Tab: Form Title & Description
220 * -------------------------------------------------
221 */
222 $this->start_controls_section(
223 'section_form_title_style',
224 [
225 'label' => __('Title & Description', 'essential-addons-for-elementor-lite'),
226 'tab' => Controls_Manager::TAB_STYLE,
227 'condition' => [
228 'custom_title_description' => 'yes',
229 ],
230 ]
231 );
232
233 $this->add_responsive_control(
234 'heading_alignment',
235 [
236 'label' => __('Alignment', 'essential-addons-for-elementor-lite'),
237 'type' => Controls_Manager::CHOOSE,
238 'options' => [
239 'left' => [
240 'title' => __('Left', 'essential-addons-for-elementor-lite'),
241 'icon' => 'eicon-text-align-left',
242 ],
243 'center' => [
244 'title' => __('Center', 'essential-addons-for-elementor-lite'),
245 'icon' => 'eicon-text-align-center',
246 ],
247 'right' => [
248 'title' => __('Right', 'essential-addons-for-elementor-lite'),
249 'icon' => 'eicon-text-align-right',
250 ],
251 ],
252 'default' => '',
253 'selectors' => [
254 '{{WRAPPER}} .eael-caldera-form-heading' => 'text-align: {{VALUE}};',
255 ],
256 'condition' => [
257 'custom_title_description' => 'yes',
258 ],
259 ]
260 );
261
262 $this->add_control(
263 'title_heading',
264 [
265 'label' => __('Title', 'essential-addons-for-elementor-lite'),
266 'type' => Controls_Manager::HEADING,
267 'separator' => 'before',
268 'condition' => [
269 'custom_title_description' => 'yes',
270 ],
271 ]
272 );
273
274 $this->add_control(
275 'form_title_text_color',
276 [
277 'label' => __('Text Color', 'essential-addons-for-elementor-lite'),
278 'type' => Controls_Manager::COLOR,
279 'default' => '',
280 'selectors' => [
281 '{{WRAPPER}} .eael-contact-form-title' => 'color: {{VALUE}}',
282 ],
283 'condition' => [
284 'custom_title_description' => 'yes',
285 ],
286 ]
287 );
288
289 $this->add_group_control(
290 Group_Control_Typography::get_type(),
291 [
292 'name' => 'form_title_typography',
293 'label' => __('Typography', 'essential-addons-for-elementor-lite'),
294 'selector' => '{{WRAPPER}} .eael-contact-form-title',
295 'condition' => [
296 'custom_title_description' => 'yes',
297 ],
298 ]
299 );
300
301 $this->add_responsive_control(
302 'form_title_margin',
303 [
304 'label' => __('Margin', 'essential-addons-for-elementor-lite'),
305 'type' => Controls_Manager::DIMENSIONS,
306 'size_units' => ['px', 'em', '%'],
307 'allowed_dimensions' => 'vertical',
308 'placeholder' => [
309 'top' => '',
310 'right' => 'auto',
311 'bottom' => '',
312 'left' => 'auto',
313 ],
314 'selectors' => [
315 '{{WRAPPER}} .eael-contact-form-title' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
316 ],
317 'condition' => [
318 'custom_title_description' => 'yes',
319 ],
320 ]
321 );
322
323 $this->add_control(
324 'description_heading',
325 [
326 'label' => __('Description', 'essential-addons-for-elementor-lite'),
327 'type' => Controls_Manager::HEADING,
328 'separator' => 'before',
329 'condition' => [
330 'custom_title_description' => 'yes',
331 ],
332 ]
333 );
334
335 $this->add_control(
336 'form_description_text_color',
337 [
338 'label' => __('Text Color', 'essential-addons-for-elementor-lite'),
339 'type' => Controls_Manager::COLOR,
340 'default' => '',
341 'selectors' => [
342 '{{WRAPPER}} .eael-contact-form-description' => 'color: {{VALUE}}',
343 ],
344 'condition' => [
345 'custom_title_description' => 'yes',
346 ],
347 ]
348 );
349
350 $this->add_group_control(
351 Group_Control_Typography::get_type(),
352 [
353 'name' => 'form_description_typography',
354 'label' => __('Typography', 'essential-addons-for-elementor-lite'),
355 'global' => [
356 'default' => Global_Typography::TYPOGRAPHY_ACCENT,
357 ],
358 'selector' => '{{WRAPPER}} .eael-contact-form-description',
359 'condition' => [
360 'custom_title_description' => 'yes',
361 ],
362 ]
363 );
364
365 $this->add_responsive_control(
366 'form_description_margin',
367 [
368 'label' => __('Margin', 'essential-addons-for-elementor-lite'),
369 'type' => Controls_Manager::DIMENSIONS,
370 'size_units' => ['px', 'em', '%'],
371 'allowed_dimensions' => 'vertical',
372 'placeholder' => [
373 'top' => '',
374 'right' => 'auto',
375 'bottom' => '',
376 'left' => 'auto',
377 ],
378 'selectors' => [
379 '{{WRAPPER}} .eael-contact-form-description' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
380 ],
381 'condition' => [
382 'custom_title_description' => 'yes',
383 ],
384 ]
385 );
386
387 $this->end_controls_section();
388
389 /**
390 * Style Tab: Form Container
391 * -------------------------------------------------
392 */
393 $this->start_controls_section(
394 'section_container_style',
395 [
396 'label' => __('Form Container', 'essential-addons-for-elementor-lite'),
397 'tab' => Controls_Manager::TAB_STYLE,
398 ]
399 );
400
401 $this->add_control(
402 'eael_contact_form_background',
403 [
404 'label' => esc_html__('Form Background Color', 'essential-addons-for-elementor-lite'),
405 'type' => Controls_Manager::COLOR,
406 'selectors' => [
407 '{{WRAPPER}} .eael-contact-form' => 'background: {{VALUE}};',
408 ],
409 ]
410 );
411
412 $this->add_responsive_control(
413 'eael_contact_form_alignment',
414 [
415 'label' => esc_html__('Form Alignment', 'essential-addons-for-elementor-lite'),
416 'type' => Controls_Manager::CHOOSE,
417 'label_block' => true,
418 'options' => [
419 'default' => [
420 'title' => __('Default', 'essential-addons-for-elementor-lite'),
421 'icon' => 'fa fa-ban',
422 ],
423 'left' => [
424 'title' => esc_html__('Left', 'essential-addons-for-elementor-lite'),
425 'icon' => 'eicon-h-align-left',
426 ],
427 'center' => [
428 'title' => esc_html__('Center', 'essential-addons-for-elementor-lite'),
429 'icon' => 'eicon-h-align-center',
430 ],
431 'right' => [
432 'title' => esc_html__('Right', 'essential-addons-for-elementor-lite'),
433 'icon' => 'eicon-h-align-right',
434 ],
435 ],
436 'default' => 'default',
437 ]
438 );
439
440 $this->add_responsive_control(
441 'eael_contact_form_max_width',
442 [
443 'label' => esc_html__('Form Max Width', 'essential-addons-for-elementor-lite'),
444 'type' => Controls_Manager::SLIDER,
445 'size_units' => ['px', 'em', '%'],
446 'range' => [
447 'px' => [
448 'min' => 10,
449 'max' => 1500,
450 ],
451 'em' => [
452 'min' => 1,
453 'max' => 80,
454 ],
455 ],
456 'selectors' => [
457 '{{WRAPPER}} .eael-contact-form' => 'max-width: {{SIZE}}{{UNIT}};',
458 ],
459 ]
460 );
461
462 $this->add_responsive_control(
463 'eael_contact_form_margin',
464 [
465 'label' => esc_html__('Form Margin', 'essential-addons-for-elementor-lite'),
466 'type' => Controls_Manager::DIMENSIONS,
467 'size_units' => ['px', 'em', '%'],
468 'selectors' => [
469 '{{WRAPPER}} .eael-contact-form' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
470 ],
471 ]
472 );
473
474 $this->add_responsive_control(
475 'eael_contact_form_padding',
476 [
477 'label' => esc_html__('Form Padding', 'essential-addons-for-elementor-lite'),
478 'type' => Controls_Manager::DIMENSIONS,
479 'size_units' => ['px', 'em', '%'],
480 'selectors' => [
481 '{{WRAPPER}} .eael-contact-form' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
482 ],
483 ]
484 );
485
486 $this->add_control(
487 'eael_contact_form_border_radius',
488 [
489 'label' => esc_html__('Border Radius', 'essential-addons-for-elementor-lite'),
490 'type' => Controls_Manager::DIMENSIONS,
491 'separator' => 'before',
492 'size_units' => ['px'],
493 'selectors' => [
494 '{{WRAPPER}} .eael-contact-form' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
495 ],
496 ]
497 );
498
499 $this->add_group_control(
500 Group_Control_Border::get_type(),
501 [
502 'name' => 'eael_contact_form_border',
503 'selector' => '{{WRAPPER}} .eael-contact-form',
504 ]
505 );
506
507 $this->add_group_control(
508 Group_Control_Box_Shadow::get_type(),
509 [
510 'name' => 'eael_contact_form_box_shadow',
511 'selector' => '{{WRAPPER}} .eael-contact-form',
512 ]
513 );
514
515 $this->end_controls_section();
516
517 /**
518 * Style Tab: Labels
519 * -------------------------------------------------
520 */
521 $this->start_controls_section(
522 'section_label_style',
523 [
524 'label' => __('Labels', 'essential-addons-for-elementor-lite'),
525 'tab' => Controls_Manager::TAB_STYLE,
526 ]
527 );
528
529 $this->add_control(
530 'text_color_label',
531 [
532 'label' => __('Text Color', 'essential-addons-for-elementor-lite'),
533 'type' => Controls_Manager::COLOR,
534 'selectors' => [
535 '{{WRAPPER}} .eael-caldera-form .form-group label' => 'color: {{VALUE}}',
536 ],
537 ]
538 );
539
540 $this->add_group_control(
541 Group_Control_Typography::get_type(),
542 [
543 'name' => 'typography_label',
544 'label' => __('Typography', 'essential-addons-for-elementor-lite'),
545 'selector' => '{{WRAPPER}} .eael-caldera-form .form-group label',
546 ]
547 );
548
549 $this->end_controls_section();
550
551 /**
552 * Style Tab: Input & Textarea
553 * -------------------------------------------------
554 */
555 $this->start_controls_section(
556 'section_fields_style',
557 [
558 'label' => __('Input & Textarea', 'essential-addons-for-elementor-lite'),
559 'tab' => Controls_Manager::TAB_STYLE,
560 ]
561 );
562
563 $this->add_responsive_control(
564 'input_alignment',
565 [
566 'label' => __('Alignment', 'essential-addons-for-elementor-lite'),
567 'type' => Controls_Manager::CHOOSE,
568 'options' => [
569 'left' => [
570 'title' => __('Left', 'essential-addons-for-elementor-lite'),
571 'icon' => 'eicon-text-align-left',
572 ],
573 'center' => [
574 'title' => __('Center', 'essential-addons-for-elementor-lite'),
575 'icon' => 'eicon-text-align-center',
576 ],
577 'right' => [
578 'title' => __('Right', 'essential-addons-for-elementor-lite'),
579 'icon' => 'eicon-text-align-right',
580 ],
581 ],
582 'default' => '',
583 'selectors' => [
584 '{{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}};',
585 ],
586 ]
587 );
588
589 $this->start_controls_tabs('tabs_fields_style');
590
591 $this->start_controls_tab(
592 'tab_fields_normal',
593 [
594 'label' => __('Normal', 'essential-addons-for-elementor-lite'),
595 ]
596 );
597
598 $this->add_control(
599 'field_bg_color',
600 [
601 'label' => __('Background Color', 'essential-addons-for-elementor-lite'),
602 'type' => Controls_Manager::COLOR,
603 'default' => '',
604 'selectors' => [
605 '{{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}}',
606 ],
607 ]
608 );
609
610 $this->add_control(
611 'field_text_color',
612 [
613 'label' => __('Text Color', 'essential-addons-for-elementor-lite'),
614 'type' => Controls_Manager::COLOR,
615 'default' => '',
616 'selectors' => [
617 '{{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}}',
618 ],
619 ]
620 );
621
622 $this->add_group_control(
623 Group_Control_Border::get_type(),
624 [
625 'name' => 'field_border',
626 'label' => __('Border', 'essential-addons-for-elementor-lite'),
627 'placeholder' => '1px',
628 'default' => '1px',
629 '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',
630 'separator' => 'before',
631 ]
632 );
633
634 $this->add_control(
635 'field_radius',
636 [
637 'label' => __('Border Radius', 'essential-addons-for-elementor-lite'),
638 'type' => Controls_Manager::DIMENSIONS,
639 'size_units' => ['px', 'em', '%'],
640 'selectors' => [
641 '{{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}};',
642 ],
643 ]
644 );
645
646 $this->add_responsive_control(
647 'field_text_indent',
648 [
649 'label' => __('Text Indent', 'essential-addons-for-elementor-lite'),
650 'type' => Controls_Manager::SLIDER,
651 'range' => [
652 'px' => [
653 'min' => 0,
654 'max' => 60,
655 'step' => 1,
656 ],
657 '%' => [
658 'min' => 0,
659 'max' => 30,
660 'step' => 1,
661 ],
662 ],
663 'size_units' => ['px', 'em', '%'],
664 'selectors' => [
665 '{{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}}',
666 ],
667 'separator' => 'before',
668 ]
669 );
670
671 $this->add_responsive_control(
672 'input_width',
673 [
674 'label' => __('Input Width', 'essential-addons-for-elementor-lite'),
675 'type' => Controls_Manager::SLIDER,
676 'range' => [
677 'px' => [
678 'min' => 0,
679 'max' => 1200,
680 'step' => 1,
681 ],
682 ],
683 'size_units' => ['px', 'em', '%'],
684 'selectors' => [
685 '{{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}}',
686 ],
687 ]
688 );
689
690 $this->add_responsive_control(
691 'input_height',
692 [
693 'label' => __('Input Height', 'essential-addons-for-elementor-lite'),
694 'type' => Controls_Manager::SLIDER,
695 'range' => [
696 'px' => [
697 'min' => 0,
698 'max' => 80,
699 'step' => 1,
700 ],
701 ],
702 'size_units' => ['px', 'em', '%'],
703 'selectors' => [
704 '{{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}}',
705 ],
706 ]
707 );
708
709 $this->add_responsive_control(
710 'textarea_width',
711 [
712 'label' => __('Textarea Width', 'essential-addons-for-elementor-lite'),
713 'type' => Controls_Manager::SLIDER,
714 'range' => [
715 'px' => [
716 'min' => 0,
717 'max' => 1200,
718 'step' => 1,
719 ],
720 ],
721 'size_units' => ['px', 'em', '%'],
722 'selectors' => [
723 '{{WRAPPER}} .eael-caldera-form .form-group textarea' => 'width: {{SIZE}}{{UNIT}}',
724 ],
725 ]
726 );
727
728 $this->add_responsive_control(
729 'textarea_height',
730 [
731 'label' => __('Textarea Height', 'essential-addons-for-elementor-lite'),
732 'type' => Controls_Manager::SLIDER,
733 'range' => [
734 'px' => [
735 'min' => 0,
736 'max' => 400,
737 'step' => 1,
738 ],
739 ],
740 'size_units' => ['px', 'em', '%'],
741 'selectors' => [
742 '{{WRAPPER}} .eael-caldera-form .form-group textarea' => 'height: {{SIZE}}{{UNIT}}',
743 ],
744 ]
745 );
746
747 $this->add_responsive_control(
748 'field_padding',
749 [
750 'label' => __('Padding', 'essential-addons-for-elementor-lite'),
751 'type' => Controls_Manager::DIMENSIONS,
752 'size_units' => ['px', 'em', '%'],
753 'selectors' => [
754 '{{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}};',
755 ],
756 ]
757 );
758
759 $this->add_responsive_control(
760 'field_spacing',
761 [
762 'label' => __('Spacing', 'essential-addons-for-elementor-lite'),
763 'type' => Controls_Manager::SLIDER,
764 'range' => [
765 'px' => [
766 'min' => 0,
767 'max' => 100,
768 'step' => 1,
769 ],
770 ],
771 'size_units' => ['px', 'em', '%'],
772 'selectors' => [
773 '{{WRAPPER}} .eael-caldera-form .form-group' => 'margin-bottom: {{SIZE}}{{UNIT}}',
774 ],
775 ]
776 );
777
778 $this->add_group_control(
779 Group_Control_Typography::get_type(),
780 [
781 'name' => 'field_typography',
782 'label' => __('Typography', 'essential-addons-for-elementor-lite'),
783 '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',
784 'separator' => 'before',
785 ]
786 );
787
788 $this->add_group_control(
789 Group_Control_Box_Shadow::get_type(),
790 [
791 'name' => 'field_box_shadow',
792 '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',
793 'separator' => 'before',
794 ]
795 );
796
797 $this->end_controls_tab();
798
799 $this->start_controls_tab(
800 'tab_fields_focus',
801 [
802 'label' => __('Focus', 'essential-addons-for-elementor-lite'),
803 ]
804 );
805
806 $this->add_control(
807 'field_bg_color_focus',
808 [
809 'label' => __('Background Color', 'essential-addons-for-elementor-lite'),
810 'type' => Controls_Manager::COLOR,
811 'default' => '',
812 'selectors' => [
813 '{{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}}',
814 ],
815 ]
816 );
817
818 $this->add_group_control(
819 Group_Control_Border::get_type(),
820 [
821 'name' => 'focus_input_border',
822 'label' => __('Border', 'essential-addons-for-elementor-lite'),
823 'placeholder' => '1px',
824 'default' => '1px',
825 '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',
826 ]
827 );
828
829 $this->add_group_control(
830 Group_Control_Box_Shadow::get_type(),
831 [
832 'name' => 'focus_box_shadow',
833 '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',
834 'separator' => 'before',
835 ]
836 );
837
838 $this->end_controls_tab();
839
840 $this->end_controls_tabs();
841
842 $this->end_controls_section();
843
844 /**
845 * Style Tab: Field Description
846 * -------------------------------------------------
847 */
848 $this->start_controls_section(
849 'section_field_description_style',
850 [
851 'label' => __('Field Description', 'essential-addons-for-elementor-lite'),
852 'tab' => Controls_Manager::TAB_STYLE,
853 ]
854 );
855
856 $this->add_control(
857 'field_description_text_color',
858 [
859 'label' => __('Text Color', 'essential-addons-for-elementor-lite'),
860 'type' => Controls_Manager::COLOR,
861 'selectors' => [
862 '{{WRAPPER}} .eael-caldera-form .help-block' => 'color: {{VALUE}}',
863 ],
864 ]
865 );
866
867 $this->add_group_control(
868 Group_Control_Typography::get_type(),
869 [
870 'name' => 'field_description_typography',
871 'label' => __('Typography', 'essential-addons-for-elementor-lite'),
872 'selector' => '{{WRAPPER}} .eael-caldera-form .help-block',
873 ]
874 );
875
876 $this->add_responsive_control(
877 'field_description_spacing',
878 [
879 'label' => __('Spacing', 'essential-addons-for-elementor-lite'),
880 'type' => Controls_Manager::SLIDER,
881 'range' => [
882 'px' => [
883 'min' => 0,
884 'max' => 100,
885 'step' => 1,
886 ],
887 ],
888 'size_units' => ['px', 'em', '%'],
889 'selectors' => [
890 '{{WRAPPER}} .eael-caldera-form .help-block' => 'padding-top: {{SIZE}}{{UNIT}}',
891 ],
892 ]
893 );
894
895 $this->end_controls_section();
896
897 /**
898 * Style Tab: Placeholder
899 * -------------------------------------------------
900 */
901 $this->start_controls_section(
902 'section_placeholder_style',
903 [
904 'label' => __('Placeholder', 'essential-addons-for-elementor-lite'),
905 'tab' => Controls_Manager::TAB_STYLE,
906 'condition' => [
907 'placeholder_switch' => 'yes',
908 ],
909 ]
910 );
911
912 $this->add_control(
913 'text_color_placeholder',
914 [
915 'label' => __('Text Color', 'essential-addons-for-elementor-lite'),
916 'type' => Controls_Manager::COLOR,
917 'selectors' => [
918 '{{WRAPPER}} .eael-caldera-form .form-group input::-webkit-input-placeholder, {{WRAPPER}} .eael-caldera-form .form-group textarea::-webkit-input-placeholder' => 'color: {{VALUE}}',
919 ],
920 'condition' => [
921 'placeholder_switch' => 'yes',
922 ],
923 ]
924 );
925
926 $this->end_controls_section();
927
928 /**
929 * Style Tab: Radio & Checkbox
930 * -------------------------------------------------
931 */
932 $this->start_controls_section(
933 'section_radio_checkbox_style',
934 [
935 'label' => __('Radio & Checkbox', 'essential-addons-for-elementor-lite'),
936 'tab' => Controls_Manager::TAB_STYLE,
937 ]
938 );
939
940 $this->add_control(
941 'custom_radio_checkbox',
942 [
943 'label' => __('Custom Styles', 'essential-addons-for-elementor-lite'),
944 'type' => Controls_Manager::SWITCHER,
945 'label_on' => __('Yes', 'essential-addons-for-elementor-lite'),
946 'label_off' => __('No', 'essential-addons-for-elementor-lite'),
947 'return_value' => 'yes',
948 ]
949 );
950
951 $this->add_responsive_control(
952 'radio_checkbox_size',
953 [
954 'label' => __('Size', 'essential-addons-for-elementor-lite'),
955 'type' => Controls_Manager::SLIDER,
956 'default' => [
957 'size' => '15',
958 'unit' => 'px',
959 ],
960 'range' => [
961 'px' => [
962 'min' => 0,
963 'max' => 80,
964 'step' => 1,
965 ],
966 ],
967 'size_units' => ['px', 'em', '%'],
968 'selectors' => [
969 '{{WRAPPER}} .eael-custom-radio-checkbox input[type="checkbox"], {{WRAPPER}} .eael-custom-radio-checkbox input[type="radio"]' => 'width: {{SIZE}}{{UNIT}}; height: {{SIZE}}{{UNIT}}',
970 ],
971 'condition' => [
972 'custom_radio_checkbox' => 'yes',
973 ],
974 ]
975 );
976
977 $this->start_controls_tabs('tabs_radio_checkbox_style');
978
979 $this->start_controls_tab(
980 'radio_checkbox_normal',
981 [
982 'label' => __('Normal', 'essential-addons-for-elementor-lite'),
983 'condition' => [
984 'custom_radio_checkbox' => 'yes',
985 ],
986 ]
987 );
988
989 $this->add_control(
990 'radio_checkbox_color',
991 [
992 'label' => __('Color', 'essential-addons-for-elementor-lite'),
993 'type' => Controls_Manager::COLOR,
994 'default' => '',
995 'selectors' => [
996 '{{WRAPPER}} .eael-custom-radio-checkbox input[type="checkbox"], {{WRAPPER}} .eael-custom-radio-checkbox input[type="radio"]' => 'background: {{VALUE}}',
997 ],
998 'condition' => [
999 'custom_radio_checkbox' => 'yes',
1000 ],
1001 ]
1002 );
1003
1004 $this->add_responsive_control(
1005 'checkbox_border_width',
1006 [
1007 'label' => __('Border Width', 'essential-addons-for-elementor-lite'),
1008 'type' => Controls_Manager::SLIDER,
1009 'range' => [
1010 'px' => [
1011 'min' => 0,
1012 'max' => 15,
1013 'step' => 1,
1014 ],
1015 ],
1016 'size_units' => ['px'],
1017 'selectors' => [
1018 '{{WRAPPER}} .eael-custom-radio-checkbox input[type="checkbox"], {{WRAPPER}} .eael-custom-radio-checkbox input[type="radio"]' => 'border-width: {{SIZE}}{{UNIT}}',
1019 ],
1020 'condition' => [
1021 'custom_radio_checkbox' => 'yes',
1022 ],
1023 ]
1024 );
1025
1026 $this->add_control(
1027 'checkbox_border_color',
1028 [
1029 'label' => __('Border Color', 'essential-addons-for-elementor-lite'),
1030 'type' => Controls_Manager::COLOR,
1031 'default' => '',
1032 'selectors' => [
1033 '{{WRAPPER}} .eael-custom-radio-checkbox input[type="checkbox"], {{WRAPPER}} .eael-custom-radio-checkbox input[type="radio"]' => 'border-color: {{VALUE}}',
1034 ],
1035 'condition' => [
1036 'custom_radio_checkbox' => 'yes',
1037 ],
1038 ]
1039 );
1040
1041 $this->add_control(
1042 'checkbox_heading',
1043 [
1044 'label' => __('Checkbox', 'essential-addons-for-elementor-lite'),
1045 'type' => Controls_Manager::HEADING,
1046 'condition' => [
1047 'custom_radio_checkbox' => 'yes',
1048 ],
1049 ]
1050 );
1051
1052 $this->add_control(
1053 'checkbox_border_radius',
1054 [
1055 'label' => __('Border Radius', 'essential-addons-for-elementor-lite'),
1056 'type' => Controls_Manager::DIMENSIONS,
1057 'size_units' => ['px', 'em', '%'],
1058 'selectors' => [
1059 '{{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}};',
1060 ],
1061 'condition' => [
1062 'custom_radio_checkbox' => 'yes',
1063 ],
1064 ]
1065 );
1066
1067 $this->add_control(
1068 'radio_heading',
1069 [
1070 'label' => __('Radio Buttons', 'essential-addons-for-elementor-lite'),
1071 'type' => Controls_Manager::HEADING,
1072 'condition' => [
1073 'custom_radio_checkbox' => 'yes',
1074 ],
1075 ]
1076 );
1077
1078 $this->add_control(
1079 'radio_border_radius',
1080 [
1081 'label' => __('Border Radius', 'essential-addons-for-elementor-lite'),
1082 'type' => Controls_Manager::DIMENSIONS,
1083 'size_units' => ['px', 'em', '%'],
1084 'selectors' => [
1085 '{{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}};',
1086 ],
1087 'condition' => [
1088 'custom_radio_checkbox' => 'yes',
1089 ],
1090 ]
1091 );
1092
1093 $this->end_controls_tab();
1094
1095 $this->start_controls_tab(
1096 'radio_checkbox_checked',
1097 [
1098 'label' => __('Checked', 'essential-addons-for-elementor-lite'),
1099 'condition' => [
1100 'custom_radio_checkbox' => 'yes',
1101 ],
1102 ]
1103 );
1104
1105 $this->add_control(
1106 'radio_checkbox_color_checked',
1107 [
1108 'label' => __('Color', 'essential-addons-for-elementor-lite'),
1109 'type' => Controls_Manager::COLOR,
1110 'default' => '',
1111 'selectors' => [
1112 '{{WRAPPER}} .eael-custom-radio-checkbox input[type="checkbox"]:checked:before, {{WRAPPER}} .eael-custom-radio-checkbox input[type="radio"]:checked:before' => 'background: {{VALUE}}',
1113 ],
1114 'condition' => [
1115 'custom_radio_checkbox' => 'yes',
1116 ],
1117 ]
1118 );
1119
1120 $this->end_controls_tab();
1121
1122 $this->end_controls_tabs();
1123
1124 $this->end_controls_section();
1125
1126 /**
1127 * Style Tab: Submit Button
1128 * -------------------------------------------------
1129 */
1130 $this->start_controls_section(
1131 'section_submit_button_style',
1132 [
1133 'label' => __('Submit Button', 'essential-addons-for-elementor-lite'),
1134 'tab' => Controls_Manager::TAB_STYLE,
1135 ]
1136 );
1137
1138 $this->add_responsive_control(
1139 'button_align',
1140 [
1141 'label' => __('Alignment', 'essential-addons-for-elementor-lite'),
1142 'type' => Controls_Manager::CHOOSE,
1143 'options' => [
1144 'left' => [
1145 'title' => __('Left', 'essential-addons-for-elementor-lite'),
1146 'icon' => 'eicon-h-align-left',
1147 ],
1148 'center' => [
1149 'title' => __('Center', 'essential-addons-for-elementor-lite'),
1150 'icon' => 'eicon-h-align-center',
1151 ],
1152 'right' => [
1153 'title' => __('Right', 'essential-addons-for-elementor-lite'),
1154 'icon' => 'eicon-h-align-right',
1155 ],
1156 ],
1157 'default' => '',
1158 'prefix_class' => 'eael-caldera-form-button-',
1159 'condition' => [
1160 'button_width_type' => 'custom',
1161 ],
1162 ]
1163 );
1164
1165 $this->add_control(
1166 'button_width_type',
1167 [
1168 'label' => __('Width', 'essential-addons-for-elementor-lite'),
1169 'type' => Controls_Manager::SELECT,
1170 'default' => 'custom',
1171 'options' => [
1172 'full-width' => __('Full Width', 'essential-addons-for-elementor-lite'),
1173 'custom' => __('Custom', 'essential-addons-for-elementor-lite'),
1174 ],
1175 'prefix_class' => 'eael-caldera-form-button-',
1176 ]
1177 );
1178
1179 $this->add_responsive_control(
1180 'button_width',
1181 [
1182 'label' => __('Width', 'essential-addons-for-elementor-lite'),
1183 'type' => Controls_Manager::SLIDER,
1184 'range' => [
1185 'px' => [
1186 'min' => 0,
1187 'max' => 1200,
1188 'step' => 1,
1189 ],
1190 ],
1191 'size_units' => ['px', '%'],
1192 'selectors' => [
1193 '{{WRAPPER}} .eael-caldera-form .form-group input[type="submit"], {{WRAPPER}} .eael-caldera-form .form-group input[type="button"]' => 'width: {{SIZE}}{{UNIT}}',
1194 ],
1195 'condition' => [
1196 'button_width_type' => 'custom',
1197 ],
1198 ]
1199 );
1200
1201 $this->start_controls_tabs('tabs_button_style');
1202
1203 $this->start_controls_tab(
1204 'tab_button_normal',
1205 [
1206 'label' => __('Normal', 'essential-addons-for-elementor-lite'),
1207 ]
1208 );
1209
1210 $this->add_control(
1211 'button_bg_color_normal',
1212 [
1213 'label' => __('Background Color', 'essential-addons-for-elementor-lite'),
1214 'type' => Controls_Manager::COLOR,
1215 'default' => '',
1216 'selectors' => [
1217 '{{WRAPPER}} .eael-caldera-form .form-group input[type="submit"], {{WRAPPER}} .eael-caldera-form .form-group input[type="button"]' => 'background-color: {{VALUE}}',
1218 ],
1219 ]
1220 );
1221
1222 $this->add_control(
1223 'button_text_color_normal',
1224 [
1225 'label' => __('Text Color', 'essential-addons-for-elementor-lite'),
1226 'type' => Controls_Manager::COLOR,
1227 'default' => '',
1228 'selectors' => [
1229 '{{WRAPPER}} .eael-caldera-form .form-group input[type="submit"], {{WRAPPER}} .eael-caldera-form .form-group input[type="button"]' => 'color: {{VALUE}}',
1230 ],
1231 ]
1232 );
1233
1234 $this->add_group_control(
1235 Group_Control_Border::get_type(),
1236 [
1237 'name' => 'button_border_normal',
1238 'label' => __('Border', 'essential-addons-for-elementor-lite'),
1239 'placeholder' => '1px',
1240 'default' => '1px',
1241 'selector' => '{{WRAPPER}} .eael-caldera-form .form-group input[type="submit"], {{WRAPPER}} .eael-caldera-form .form-group input[type="button"]',
1242 ]
1243 );
1244
1245 $this->add_control(
1246 'button_border_radius',
1247 [
1248 'label' => __('Border Radius', 'essential-addons-for-elementor-lite'),
1249 'type' => Controls_Manager::DIMENSIONS,
1250 'size_units' => ['px', 'em', '%'],
1251 'selectors' => [
1252 '{{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}};',
1253 ],
1254 ]
1255 );
1256
1257 $this->add_responsive_control(
1258 'button_padding',
1259 [
1260 'label' => __('Padding', 'essential-addons-for-elementor-lite'),
1261 'type' => Controls_Manager::DIMENSIONS,
1262 'size_units' => ['px', 'em', '%'],
1263 'selectors' => [
1264 '{{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}};',
1265 ],
1266 ]
1267 );
1268
1269 $this->add_responsive_control(
1270 'button_margin',
1271 [
1272 'label' => __('Margin Top', 'essential-addons-for-elementor-lite'),
1273 'type' => Controls_Manager::SLIDER,
1274 'range' => [
1275 'px' => [
1276 'min' => 0,
1277 'max' => 100,
1278 'step' => 1,
1279 ],
1280 ],
1281 'size_units' => ['px', 'em', '%'],
1282 'selectors' => [
1283 '{{WRAPPER}} .eael-caldera-form .form-group input[type="submit"], {{WRAPPER}} .eael-caldera-form .form-group input[type="button"]' => 'margin-top: {{SIZE}}{{UNIT}}',
1284 ],
1285 ]
1286 );
1287
1288 $this->add_group_control(
1289 Group_Control_Typography::get_type(),
1290 [
1291 'name' => 'button_typography',
1292 'label' => __('Typography', 'essential-addons-for-elementor-lite'),
1293 'selector' => '{{WRAPPER}} .eael-caldera-form .form-group input[type="submit"], {{WRAPPER}} .eael-caldera-form .form-group input[type="button"]',
1294 'separator' => 'before',
1295 ]
1296 );
1297
1298 $this->add_group_control(
1299 Group_Control_Box_Shadow::get_type(),
1300 [
1301 'name' => 'button_box_shadow',
1302 'selector' => '{{WRAPPER}} .eael-caldera-form .form-group input[type="submit"], {{WRAPPER}} .eael-caldera-form .form-group input[type="button"]',
1303 'separator' => 'before',
1304 ]
1305 );
1306
1307 $this->end_controls_tab();
1308
1309 $this->start_controls_tab(
1310 'tab_button_hover',
1311 [
1312 'label' => __('Hover', 'essential-addons-for-elementor-lite'),
1313 ]
1314 );
1315
1316 $this->add_control(
1317 'button_bg_color_hover',
1318 [
1319 'label' => __('Background Color', 'essential-addons-for-elementor-lite'),
1320 'type' => Controls_Manager::COLOR,
1321 'default' => '',
1322 'selectors' => [
1323 '{{WRAPPER}} .eael-caldera-form .form-group input[type="submit"]:hover, {{WRAPPER}} .eael-caldera-form .form-group input[type="button"]:hover' => 'background-color: {{VALUE}}',
1324 ],
1325 ]
1326 );
1327
1328 $this->add_control(
1329 'button_text_color_hover',
1330 [
1331 'label' => __('Text Color', 'essential-addons-for-elementor-lite'),
1332 'type' => Controls_Manager::COLOR,
1333 'default' => '',
1334 'selectors' => [
1335 '{{WRAPPER}} .eael-caldera-form .form-group input[type="submit"]:hover, {{WRAPPER}} .eael-caldera-form .form-group input[type="button"]:hover' => 'color: {{VALUE}}',
1336 ],
1337 ]
1338 );
1339
1340 $this->add_control(
1341 'button_border_color_hover',
1342 [
1343 'label' => __('Border Color', 'essential-addons-for-elementor-lite'),
1344 'type' => Controls_Manager::COLOR,
1345 'default' => '',
1346 'selectors' => [
1347 '{{WRAPPER}} .eael-caldera-form .form-group input[type="submit"]:hover, {{WRAPPER}} .eael-caldera-form .form-group input[type="button"]:hover' => 'border-color: {{VALUE}}',
1348 ],
1349 ]
1350 );
1351
1352 $this->end_controls_tab();
1353
1354 $this->end_controls_tabs();
1355
1356 $this->end_controls_section();
1357
1358 /**
1359 * Style Tab: Success Message
1360 * -------------------------------------------------
1361 */
1362 $this->start_controls_section(
1363 'section_success_message_style',
1364 [
1365 'label' => __('Success Message', 'essential-addons-for-elementor-lite'),
1366 'tab' => Controls_Manager::TAB_STYLE,
1367 ]
1368 );
1369
1370 $this->add_control(
1371 'success_message_bg_color',
1372 [
1373 'label' => __('Background Color', 'essential-addons-for-elementor-lite'),
1374 'type' => Controls_Manager::COLOR,
1375 'selectors' => [
1376 '{{WRAPPER}} .eael-caldera-form .caldera-grid .alert-success' => 'background-color: {{VALUE}}',
1377 ],
1378 ]
1379 );
1380
1381 $this->add_control(
1382 'success_message_text_color',
1383 [
1384 'label' => __('Text Color', 'essential-addons-for-elementor-lite'),
1385 'type' => Controls_Manager::COLOR,
1386 'selectors' => [
1387 '{{WRAPPER}} .eael-caldera-form .caldera-grid .alert-success' => 'color: {{VALUE}}',
1388 ],
1389 ]
1390 );
1391
1392 $this->add_group_control(
1393 Group_Control_Border::get_type(),
1394 [
1395 'name' => 'success_message_border',
1396 'label' => __('Border', 'essential-addons-for-elementor-lite'),
1397 'placeholder' => '1px',
1398 'default' => '1px',
1399 'selector' => '{{WRAPPER}} .eael-caldera-form .caldera-grid .alert-success',
1400 ]
1401 );
1402
1403 $this->add_group_control(
1404 Group_Control_Typography::get_type(),
1405 [
1406 'name' => 'success_message_typography',
1407 'label' => __('Typography', 'essential-addons-for-elementor-lite'),
1408 'selector' => '{{WRAPPER}} .eael-caldera-form .caldera-grid .alert-success',
1409 ]
1410 );
1411
1412 $this->end_controls_section();
1413
1414 /**
1415 * Style Tab: Errors
1416 * -------------------------------------------------
1417 */
1418 $this->start_controls_section(
1419 'section_error_style',
1420 [
1421 'label' => __('Errors', 'essential-addons-for-elementor-lite'),
1422 'tab' => Controls_Manager::TAB_STYLE,
1423 ]
1424 );
1425
1426 $this->add_control(
1427 'error_messages_heading',
1428 [
1429 'label' => __('Error Messages', 'essential-addons-for-elementor-lite'),
1430 'type' => Controls_Manager::HEADING,
1431 'condition' => [
1432 'error_messages' => 'show',
1433 ],
1434 ]
1435 );
1436
1437 $this->add_control(
1438 'error_message_text_color',
1439 [
1440 'label' => __('Color', 'essential-addons-for-elementor-lite'),
1441 'type' => Controls_Manager::COLOR,
1442 'default' => '',
1443 'selectors' => [
1444 '{{WRAPPER}} .eael-caldera-form .has-error .help-block' => 'color: {{VALUE}}',
1445 ],
1446 'condition' => [
1447 'error_messages' => 'show',
1448 ],
1449 ]
1450 );
1451
1452 $this->add_control(
1453 'error_fields_heading',
1454 [
1455 'label' => __('Error Fields', 'essential-addons-for-elementor-lite'),
1456 'type' => Controls_Manager::HEADING,
1457 'separator' => 'before',
1458 ]
1459 );
1460
1461 $this->add_control(
1462 'error_fields_label_color',
1463 [
1464 'label' => __('Label Color', 'essential-addons-for-elementor-lite'),
1465 'type' => Controls_Manager::COLOR,
1466 'default' => '',
1467 'selectors' => [
1468 '{{WRAPPER}} .eael-caldera-form .has-error .control-label' => 'color: {{VALUE}}',
1469 ],
1470 ]
1471 );
1472
1473 $this->add_group_control(
1474 Group_Control_Border::get_type(),
1475 [
1476 'name' => 'error_field_border',
1477 'label' => __('Input Border', 'essential-addons-for-elementor-lite'),
1478 'placeholder' => '1px',
1479 'default' => '1px',
1480 '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',
1481 ]
1482 );
1483
1484 $this->end_controls_section();
1485
1486 }
1487
1488 protected function render()
1489 {
1490 if ( ! class_exists( '\Caldera_Forms' ) ) {
1491 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1492 printf( '<center>%s</center>', __( '<strong>Caldera Forms</strong> has been closed as of April 5, 2022 and is not available for download. You can try the other Form plugins instead', 'essential-addons-for-elementor-lite' ) );
1493
1494 return;
1495 }
1496
1497 $settings = $this->get_settings_for_display();
1498
1499 $this->add_render_attribute('contact-form', 'class', [
1500 'eael-contact-form',
1501 'eael-caldera-form',
1502 ]);
1503
1504 if ($settings['placeholder_switch'] != 'yes') {
1505 $this->add_render_attribute('contact-form', 'class', 'placeholder-hide');
1506 }
1507
1508 if ($settings['custom_title_description'] == 'yes') {
1509 $this->add_render_attribute('contact-form', 'class', 'title-description-hide');
1510 }
1511
1512 if ($settings['custom_radio_checkbox'] == 'yes') {
1513 $this->add_render_attribute('contact-form', 'class', 'eael-custom-radio-checkbox');
1514 }
1515 if ($settings['eael_contact_form_alignment'] == 'left') {
1516 $this->add_render_attribute('contact-form', 'class', 'eael-contact-form-align-left');
1517 } elseif ($settings['eael_contact_form_alignment'] == 'center') {
1518 $this->add_render_attribute('contact-form', 'class', 'eael-contact-form-align-center');
1519 } elseif ($settings['eael_contact_form_alignment'] == 'right') {
1520 $this->add_render_attribute('contact-form', 'class', 'eael-contact-form-align-right');
1521 } else {
1522 $this->add_render_attribute('contact-form', 'class', 'eael-contact-form-align-default');
1523 }
1524
1525 if (!empty($settings['contact_form_list'])) {?>
1526 <div <?php $this->print_render_attribute_string('contact-form'); ?>>
1527 <?php if ($settings['custom_title_description'] == 'yes') {?>
1528 <div class="eael-caldera-form-heading">
1529 <?php if ($settings['form_title_custom'] != '') {?>
1530 <h3 class="eael-contact-form-title eael-caldera-form-title">
1531 <?php echo esc_attr($settings['form_title_custom']); ?>
1532 </h3>
1533 <?php }?>
1534 <?php if ($settings['form_description_custom'] != '') {?>
1535 <div class="eael-contact-form-description eael-caldera-form-description">
1536 <?php
1537 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped, WordPress.Security.EscapeOutput.OutputNotEscaped
1538 echo $this->parse_text_editor( wp_kses( $settings['form_description_custom'], Helper::eael_allowed_tags() ) );
1539 ?>
1540 </div>
1541 <?php }?>
1542 </div>
1543 <?php }?>
1544 <?php echo do_shortcode('[caldera_form id="' . esc_attr( $settings['contact_form_list'] ) . '" ]'); ?>
1545 </div>
1546 <?php
1547 }
1548 }
1549 }
1550