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