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