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