PluginProbe ʕ •ᴥ•ʔ
Premium Addons for Elementor – Powerful Elementor Templates & Widgets / 4.11.77
Premium Addons for Elementor – Powerful Elementor Templates & Widgets v4.11.77
4.11.79 4.11.78 4.11.77 4.11.76 4.11.75 3.20.5 4.11.69 3.20.6 4.11.7 3.20.7 4.11.70 3.20.8 4.11.71 3.20.9 4.11.72 3.21.1 4.11.73 3.21.2 4.11.74 3.21.3 4.11.8 3.21.4 4.11.9 3.21.5 4.2.0 3.21.6 4.2.1 3.3.0 4.2.2 3.3.1 4.2.3 3.3.2 4.2.4 3.3.3 4.2.5 3.3.4 4.2.6 3.3.5 4.2.7 3.3.6 4.2.8 3.3.7 4.2.9 3.3.8 4.3.0 3.3.9 4.3.1 3.4.0 4.3.2 3.4.1 4.3.3 3.4.2 4.3.4 3.4.3 4.3.5 3.4.4 4.3.6 3.4.5 4.3.7 3.4.6 4.3.8 3.4.7 4.3.9 3.4.8 4.4.0 3.4.9 4.4.1 3.5.0 4.4.2 3.5.1 4.4.3 3.5.2 4.4.4 3.5.3 4.4.5 3.5.4 4.4.6 3.5.5 4.4.7 3.5.6 4.4.8 3.5.7 4.4.9 3.5.8 4.5.0 3.5.9 4.5.1 3.6.0 4.5.2 3.6.1 4.5.3 3.6.2 4.5.4 3.6.3 4.5.5 3.6.4 4.5.6 3.6.5 4.5.7 3.6.6 4.5.8 3.6.7 4.5.9 3.6.8 4.6.0 3.6.9 4.6.1 3.7.0 4.7.0 3.7.1 4.7.1 3.7.2 4.7.2 3.7.3 4.7.3 3.7.4 4.7.4 3.7.5 4.7.5 3.7.6 4.7.6 3.7.7 4.7.7 3.7.8 4.7.8 3.7.9 4.7.9 3.8.0 4.8.0 3.8.1 4.8.1 3.8.2 4.8.10 3.8.3 4.8.11 3.8.4 4.8.2 3.8.5 4.8.3 3.8.6 4.8.4 3.8.7 4.8.5 3.8.8 4.8.6 3.8.9 4.8.7 3.9.0 4.8.8 3.9.1 4.8.9 3.9.2 4.9.0 3.9.3 4.9.0-beta1 3.9.4 4.9.0-beta2 3.9.5 4.9.1 3.9.6 4.9.10 3.9.7 4.9.11 3.9.8 4.9.12 3.9.9 4.9.13 4.0.1 4.9.14 4.0.3 4.9.15 4.0.4 4.9.16 4.0.5 4.9.17 4.0.6 4.9.18 4.0.7 4.9.19 4.0.8 4.9.2 4.0.9 4.9.20 4.1.0 4.9.21 4.1.1 4.9.22 4.1.2 4.9.23 4.1.3 4.9.24 trunk 4.1.4 4.9.25 1.0 4.1.5 4.9.26 1.01 4.1.6 4.9.27 1.02 4.1.7 4.9.28 1.03 4.1.8 4.9.29 1.04 4.1.9 4.9.3 1.05 4.10.0 4.9.30 1.06 4.10.1 4.9.31 1.07 4.10.10 4.9.32 1.08 4.10.11 4.9.33 1.09 4.10.12 4.9.34 2.0 4.10.13 4.9.35 2.0.1 4.10.14 4.9.36 2.0.2 4.10.15 4.9.37 2.0.3 4.10.16 4.9.38 2.0.4 4.10.17 4.9.39 2.0.5 4.10.18 4.9.4 2.0.6 4.10.19 4.9.40 2.0.7 4.10.2 4.9.41 2.0.8 4.10.20 4.9.42 2.0.9 4.10.21 4.9.43 2.1.0 4.10.22 4.9.45 2.1.1 4.10.23 4.9.46 2.1.2 4.10.24 4.9.47 2.1.3 4.10.25 4.9.48 2.1.4 4.10.26 4.9.49 2.1.5 4.10.27 4.9.5 2.1.5-beta1 4.10.28 4.9.50 2.1.6 4.10.29 4.9.51 2.1.7 4.10.3 4.9.52 2.1.8 4.10.30 4.9.53 2.1.9 4.10.31 4.9.54 2.2.0 4.10.32 4.9.55 2.2.1 4.10.33 4.9.56 2.2.2 4.10.34 4.9.57 2.2.3 4.10.35 4.9.6 2.2.4 4.10.36 4.9.7 2.2.5 4.10.37 4.9.8 2.2.6 4.10.38 4.9.9 2.2.7 4.10.39 2.2.8 4.10.4 2.2.9 4.10.40 2.3.0 4.10.41 2.3.1 4.10.42 2.3.2 4.10.43 2.3.3 4.10.44 2.3.4 4.10.45 2.3.5 4.10.46 2.3.6 4.10.47 2.3.7 4.10.48 2.3.8 4.10.49 2.3.9 4.10.5 2.4.0 4.10.50 2.4.1 4.10.51 2.5.0 4.10.52 2.5.1 4.10.53 2.5.2 4.10.54 2.5.3 4.10.55 2.5.4 4.10.56 2.5.5 4.10.57 2.5.6 4.10.58 2.5.7 4.10.59 2.5.8 4.10.6 2.5.9 4.10.60 2.6.0 4.10.61 2.6.1 4.10.62 2.6.2 4.10.63 2.6.3 4.10.64 2.6.4 4.10.65 2.6.5 4.10.66 2.6.6 4.10.67 2.6.7 4.10.68 2.6.8 4.10.69 2.6.9 4.10.7 2.7.0 4.10.70 2.7.1 4.10.71 2.7.2 4.10.72 2.7.3 4.10.73 2.7.4 4.10.74 2.7.5 4.10.75 2.7.6 4.10.76 2.7.7 4.10.77 2.7.8 4.10.78 2.7.9 4.10.79 2.8.0 4.10.8 2.8.1 4.10.80 2.8.2 4.10.81 2.8.3 4.10.82 2.8.4 4.10.83 2.8.5 4.10.84 2.8.6 4.10.85 2.8.7 4.10.86 2.8.8 4.10.87 2.8.9 4.10.88 2.9.0 4.10.89 2.9.1 4.10.9 2.9.2 4.10.90 2.9.3 4.11.0 2.9.4 4.11.1 2.9.5 4.11.10 2.9.6 4.11.11 2.9.7 4.11.12 2.9.8 4.11.13 2.9.9 4.11.14 3.0.0 4.11.15 3.0.1 4.11.16 3.0.2 4.11.17 3.0.3 4.11.18 3.0.4 4.11.19 3.0.5 4.11.2 3.0.6 4.11.20 3.0.7 4.11.21 3.0.8 4.11.22 3.0.9 4.11.23 3.1.0 4.11.24 3.1.1 4.11.25 3.1.2 4.11.26 3.1.3 4.11.27 3.1.4 4.11.28 3.1.5 4.11.29 3.1.6 4.11.3 3.1.7 4.11.30 3.1.8 4.11.31 3.1.9 4.11.32 3.10.0 4.11.33 3.10.1 4.11.34 3.10.2 4.11.35 3.10.3 4.11.36 3.10.4 4.11.37 3.10.5 4.11.38 3.10.6 4.11.39 3.10.7 4.11.4 3.10.8 4.11.40 3.10.9 4.11.41 3.11.0 4.11.42 3.11.1 4.11.43 3.11.2 4.11.44 3.11.3 4.11.45 3.11.4 4.11.46 3.11.5 4.11.47 3.11.6 4.11.48 3.11.7 4.11.49 3.11.8 4.11.5 3.11.9 4.11.50 3.12.0 4.11.51 3.12.1 4.11.52 3.12.2 4.11.53 3.12.3 4.11.54 3.2.0 4.11.55 3.2.1 4.11.56 3.2.2 4.11.57 3.2.3 4.11.58 3.2.4 4.11.59 3.2.5 4.11.6 3.2.6 4.11.60 3.2.7 4.11.61 3.2.8 4.11.62 3.2.9 4.11.63 3.20.0 4.11.64 3.20.1 4.11.65 3.20.2 4.11.66 3.20.3 4.11.67 3.20.4 4.11.68
premium-addons-for-elementor / widgets / premium-contactform.php
premium-addons-for-elementor / widgets Last commit date
dep 1 month ago premium-banner.php 3 weeks ago premium-blog.php 3 weeks ago premium-button.php 3 weeks ago premium-carousel.php 3 weeks ago premium-contactform.php 3 weeks ago premium-countdown.php 3 weeks ago premium-counter.php 3 weeks ago premium-dual-header.php 3 weeks ago premium-fancytext.php 3 weeks ago premium-grid.php 3 weeks ago premium-icon-list.php 3 weeks ago premium-image-button.php 3 weeks ago premium-image-scroll.php 3 weeks ago premium-image-separator.php 3 weeks ago premium-lottie.php 3 weeks ago premium-maps.php 3 weeks ago premium-media-wheel.php 3 weeks ago premium-mobile-menu.php 3 weeks ago premium-modalbox.php 3 weeks ago premium-nav-menu.php 3 weeks ago premium-notifications.php 3 weeks ago premium-person.php 3 weeks ago premium-pinterest-feed.php 3 weeks ago premium-post-ticker.php 3 weeks ago premium-pricing-table.php 3 weeks ago premium-progressbar.php 3 weeks ago premium-search-form.php 3 weeks ago premium-svg-drawer.php 3 weeks ago premium-tcloud.php 3 weeks ago premium-testimonials.php 3 weeks ago premium-textual-showcase.php 3 weeks ago premium-tiktok-feed.php 3 weeks ago premium-title.php 3 weeks ago premium-videobox.php 3 weeks ago premium-vscroll.php 3 weeks ago premium-weather.php 3 weeks ago premium-world-clock.php 3 weeks ago
premium-contactform.php
1903 lines
1 <?php
2 /**
3 * Premium Blog.
4 */
5
6 namespace PremiumAddons\Widgets;
7
8 // Elementor Classes.
9 use Elementor\Plugin;
10 use Elementor\Widget_Base;
11 use Elementor\Controls_Manager;
12 use Elementor\Group_Control_Border;
13 use Elementor\Group_Control_Typography;
14 use Elementor\Group_Control_Box_Shadow;
15 use Elementor\Group_Control_Text_Shadow;
16
17 // PremiumAddons Classes.
18 use PremiumAddons\Includes\Helper_Functions;
19 use PremiumAddons\Includes\Controls\Premium_Image_Choose;
20
21 if ( ! defined( 'ABSPATH' ) ) {
22 exit; // If this file is called directly, abort.
23 }
24
25 /**
26 * Class Premium_Contactform
27 */
28 class Premium_Contactform extends Widget_Base {
29
30 /**
31 * Retrieve Widget Name.
32 *
33 * @since 1.0.0
34 * @access public
35 */
36 public function get_name() {
37 return 'premium-contact-form';
38 }
39
40 /**
41 * Retrieve Widget Title.
42 *
43 * @since 1.0.0
44 * @access public
45 */
46 public function get_title() {
47 return __( 'Contact Form 7', 'premium-addons-for-elementor' );
48 }
49
50 /**
51 * Retrieve Widget Icon.
52 *
53 * @since 1.0.0
54 * @access public
55 *
56 * @return string widget icon.
57 */
58 public function get_icon() {
59 return 'pa-contact-form';
60 }
61
62 /**
63 * Retrieve Widget Categories.
64 *
65 * @since 1.5.1
66 * @access public
67 *
68 * @return array Widget categories.
69 */
70 public function get_categories() {
71 return array( 'premium-elements' );
72 }
73
74 /**
75 * Retrieve Widget Keywords.
76 *
77 * @since 1.0.0
78 * @access public
79 *
80 * @return string Widget keywords.
81 */
82 public function get_keywords() {
83 return array( 'pa', 'premium', 'premium contact form', 'form7', 'contact' );
84 }
85
86 /**
87 * Retrieve Widget Dependent CSS.
88 *
89 * @since 1.0.0
90 * @access public
91 *
92 * @return array CSS style handles.
93 */
94 public function get_style_depends() {
95 return array(
96 'pa-glass',
97 'premium-addons',
98 );
99 }
100
101 /**
102 * Retrieve Widget Dependent JS.
103 *
104 * @since 1.0.0
105 * @access public
106 *
107 * @return array JS script handles.
108 */
109 public function get_script_depends() {
110
111 $is_edit = Helper_Functions::is_edit_mode();
112
113 $scripts = array();
114 if ( $is_edit ) {
115 $scripts[] = 'pa-glass';
116 } else {
117
118 $settings = $this->get_settings();
119
120 if ( 'none' !== $settings['fields_lq_effect'] || 'none' !== $settings['submit_lq_effect'] ) {
121 $scripts[] = 'pa-glass';
122 }
123 }
124
125 $scripts[] = 'premium-addons';
126
127 return $scripts;
128 }
129
130 /**
131 * Retrieve Widget Support URL.
132 *
133 * @access public
134 *
135 * @return string support URL.
136 */
137 public function get_custom_help_url() {
138 return 'https://premiumaddons.com/support/';
139 }
140
141 public function has_widget_inner_wrapper(): bool {
142 return ! Helper_Functions::check_elementor_experiment( 'e_optimized_markup' );
143 }
144
145 /**
146 * Register Contact Form 7 controls.
147 *
148 * @since 1.0.0
149 * @access protected
150 */
151 protected function register_controls() { // phpcs:ignore PSR2.Methods.MethodDeclaration.Underscore
152
153 $papro_activated = Helper_Functions::check_papro_version();
154
155 $this->start_controls_section(
156 'premium_section_wpcf7_form',
157 array(
158 'label' => __( 'Contact Form', 'premium-addons-for-elementor' ),
159 )
160 );
161
162 $this->add_control(
163 'source',
164 array(
165 'label' => __( 'Source', 'premium-addons-for-elementor' ),
166 'label_block' => true,
167 'type' => Controls_Manager::SELECT,
168 'options' => array(
169 'existing' => __( 'Existing Forms', 'premium-addons-for-elementor' ),
170 'presets' => apply_filters( 'pa_pro_label', __( 'Form Presets (Pro)', 'premium-addons-for-elementor' ) ),
171 ),
172 'default' => 'existing',
173 )
174 );
175
176 $this->add_control(
177 'premium_wpcf7_form',
178 array(
179 'label' => __( 'Select Form', 'premium-addons-for-elementor' ),
180 'label_block' => true,
181 'type' => Controls_Manager::SELECT,
182 'options' => $this->get_wpcf_forms(),
183 'condition' => array(
184 'source' => 'existing',
185 ),
186 )
187 );
188
189 $this->add_control(
190 'presets',
191 array(
192 'label' => __( 'Select From Presets', 'premium-addons-for-elementor' ),
193 'type' => Controls_Manager::VISUAL_CHOICE,
194 'default' => 'preset1',
195 'prefix_class' => 'premium-cf__',
196 'columns' => 2,
197 'label_block' => true,
198 'options' => array(
199 'preset1' => array(
200 'title' => __( 'Preset 1', 'premium-addons-for-elementor' ),
201 'image' => PREMIUM_ADDONS_URL . 'widgets/dep/form-presets/pa-cf7-preset1.svg',
202 ),
203 'preset2' => array(
204 'title' => __( 'Preset 2', 'premium-addons-for-elementor' ),
205 'image' => PREMIUM_ADDONS_URL . 'widgets/dep/form-presets/pa-cf7-preset2.svg',
206 ),
207 'preset3' => array(
208 'title' => __( 'Preset 3', 'premium-addons-for-elementor' ),
209 'image' => PREMIUM_ADDONS_URL . 'widgets/dep/form-presets/pa-cf7-preset3.svg',
210 ),
211 'preset4' => array(
212 'title' => __( 'Preset 4', 'premium-addons-for-elementor' ),
213 'image' => PREMIUM_ADDONS_URL . 'widgets/dep/form-presets/pa-cf7-preset4.svg',
214 ),
215 'preset5' => array(
216 'title' => __( 'Preset 5', 'premium-addons-for-elementor' ),
217 'image' => PREMIUM_ADDONS_URL . 'widgets/dep/form-presets/pa-cf7-preset5.svg',
218 ),
219 'preset6' => array(
220 'title' => __( 'Preset 6', 'premium-addons-for-elementor' ),
221 'image' => PREMIUM_ADDONS_URL . 'widgets/dep/form-presets/pa-cf7-preset6.svg',
222 ),
223 ),
224 'condition' => array(
225 'source' => 'presets',
226 ),
227 )
228 );
229
230 if ( $papro_activated ) {
231
232 do_action( 'pa_cf_presets_options', $this );
233
234 } else {
235
236 $get_pro = Helper_Functions::get_campaign_link( 'https://premiumaddons.com/pro', 'form-widget', 'wp-editor', 'get-pro' );
237
238 $this->add_control(
239 'presets_notice',
240 array(
241 'type' => Controls_Manager::RAW_HTML,
242 'raw' => __( 'This option is available in Premium Addons Pro. ', 'premium-addons-for-elementor' ) . '<a href="' . esc_url( $get_pro ) . '" target="_blank">' . __( 'Upgrade now!', 'premium-addons-for-elementor' ) . '</a>',
243 'content_classes' => 'papro-upgrade-notice',
244 'condition' => array(
245 'source' => 'presets',
246 ),
247 )
248 );
249
250 }
251
252 $this->add_control(
253 'form_title',
254 array(
255 'label' => __( 'Form Title', 'premium-addons-for-elementor' ),
256 'type' => Controls_Manager::SWITCHER,
257 )
258 );
259
260 $this->add_control(
261 'title_text',
262 array(
263 'label' => __( 'Title', 'premium-addons-for-elementor' ),
264 'type' => Controls_Manager::TEXT,
265 'label_block' => true,
266 'dynamic' => array(
267 'active' => true,
268 ),
269 'condition' => array(
270 'form_title' => 'yes',
271 ),
272 'ai' => array(
273 'active' => false,
274 ),
275 )
276 );
277
278 $this->add_control(
279 'title_tag',
280 array(
281 'label' => __( 'HTML Tag', 'premium-addons-for-elementor' ),
282 'type' => Controls_Manager::SELECT,
283 'options' => array(
284 'h1' => 'H1',
285 'h2' => 'H2',
286 'h3' => 'H3',
287 'h4' => 'H4',
288 'h5' => 'H5',
289 'h6' => 'H6',
290 'div' => 'div',
291 'span' => 'span',
292 'p' => 'p',
293 ),
294 'default' => 'h3',
295 'condition' => array(
296 'form_title' => 'yes',
297 ),
298 )
299 );
300
301 $this->add_control(
302 'form_description',
303 array(
304 'label' => __( 'Form Description', 'premium-addons-for-elementor' ),
305 'type' => Controls_Manager::SWITCHER,
306 )
307 );
308
309 $this->add_control(
310 'description_text',
311 array(
312 'label' => __( 'Description', 'premium-addons-for-elementor' ),
313 'type' => Controls_Manager::TEXTAREA,
314 'dynamic' => array(
315 'active' => true,
316 ),
317 'condition' => array(
318 'form_description' => 'yes',
319 ),
320 )
321 );
322
323 $this->add_control(
324 'fields_effects',
325 array(
326 'label' => __( 'Fields Focus Effect', 'premium-addons-for-elementor' ),
327 'type' => Controls_Manager::SELECT,
328 'default' => '',
329 'options' => array(
330 '' => __( 'None', 'premium-addons-for-elementor' ),
331 'label' => apply_filters( 'pa_pro_label', __( 'Label Position (Pro)', 'premium-addons-for-elementor' ) ),
332 'label-letter' => apply_filters( 'pa_pro_label', __( 'Label Letter Spacing (Pro)', 'premium-addons-for-elementor' ) ),
333 'label-pos-back' => apply_filters( 'pa_pro_label', __( 'Label Position + Background (Pro)', 'premium-addons-for-elementor' ) ),
334 'css-filters' => apply_filters( 'pa_pro_label', __( 'Label CSS Filters (Pro)', 'premium-addons-for-elementor' ) ),
335 ),
336 'prefix_class' => 'premium-cf-anim-',
337 'render_type' => 'template',
338 'label_block' => true,
339 )
340 );
341
342 if ( $papro_activated ) {
343 do_action( 'pa_cf_effects_options', $this );
344 }
345
346 $this->end_controls_section();
347
348 $this->start_controls_section(
349 'labels_style_section',
350 array(
351 'label' => __( 'Labels', 'premium-addons-for-elementor' ),
352 'tab' => Controls_Manager::TAB_STYLE,
353 )
354 );
355
356 $this->add_control(
357 'label_display',
358 array(
359 'label' => __( 'Display', 'premium-addons-for-elementor' ),
360 'type' => Controls_Manager::SELECT,
361 'options' => array(
362 '' => __( 'Default', 'premium-addons-for-elementor' ),
363 'inline' => __( 'Inline', 'premium-addons-for-elementor' ),
364 'inline-block' => __( 'Inline Block', 'premium-addons-for-elementor' ),
365 ),
366 'default' => 'inline-block',
367 'selectors' => array(
368 '{{WRAPPER}} .premium-cf7-container .wpcf7-form label, {{WRAPPER}} .premium-cf7-container .wpcf7-form .wpcf7-quiz-label' => 'display: {{VALUE}}',
369 ),
370 )
371 );
372
373 $this->add_control(
374 'label_display_notice',
375 array(
376 'raw' => __( 'You may need to change this if labels margin option is not working. Note that this will not change the layout.', 'premium-addons-for-elementor' ),
377 'type' => Controls_Manager::RAW_HTML,
378 'content_classes' => 'elementor-panel-alert elementor-panel-alert-info',
379 )
380 );
381
382 $this->add_control(
383 'labels_color',
384 array(
385 'label' => __( 'Color', 'premium-addons-for-elementor' ),
386 'type' => Controls_Manager::COLOR,
387 'selectors' => array(
388 '{{WRAPPER}} .premium-cf7-container label' => 'color: {{VALUE}};',
389 ),
390 )
391 );
392
393 $this->add_group_control(
394 Group_Control_Typography::get_type(),
395 array(
396 'name' => 'labels_typography',
397 'selector' => '{{WRAPPER}} .premium-cf7-container label',
398 'fields_options' => array(
399 'letter_spacing' => array(
400 'size_units' => array( 'px' ),
401 ),
402 ),
403 )
404 );
405
406 $this->add_control(
407 'labels_background_color',
408 array(
409 'label' => __( 'Background Color', 'premium-addons-for-elementor' ),
410 'type' => Controls_Manager::COLOR,
411 'selectors' => array(
412 '{{WRAPPER}} .premium-cf7-container label' => 'background-color: {{VALUE}};',
413 ),
414 )
415 );
416
417 $this->add_group_control(
418 Group_Control_Border::get_type(),
419 array(
420 'name' => 'label_border',
421 'selector' => '{{WRAPPER}} .premium-cf7-container label',
422 )
423 );
424
425 $this->add_responsive_control(
426 'label_border_radius',
427 array(
428 'label' => __( 'Border Radius', 'premium-addons-for-elementor' ),
429 'type' => Controls_Manager::DIMENSIONS,
430 'size_units' => array( 'px', 'em', '%' ),
431 'selectors' => array(
432 '{{WRAPPER}} .premium-cf7-container label' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
433 ),
434 )
435 );
436
437 $this->add_group_control(
438 Group_Control_Text_Shadow::get_type(),
439 array(
440 'name' => 'labels_text_shadow',
441 'selector' => '{{WRAPPER}} .premium-cf7-container label',
442 )
443 );
444
445 $this->add_responsive_control(
446 'labels_margin',
447 array(
448 'label' => __( 'Margin', 'premium-addons-for-elementor' ),
449 'type' => Controls_Manager::DIMENSIONS,
450 'size_units' => array( 'px', 'em', '%' ),
451 'selectors' => array(
452 '{{WRAPPER}} .premium-cf7-container label' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
453 ),
454 )
455 );
456
457 $this->add_responsive_control(
458 'labels_padding',
459 array(
460 'label' => __( 'Padding', 'premium-addons-for-elementor' ),
461 'type' => Controls_Manager::DIMENSIONS,
462 'size_units' => array( 'px', 'em', '%' ),
463 'selectors' => array(
464 '{{WRAPPER}} .premium-cf7-container label' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
465 ),
466 )
467 );
468
469 $this->end_controls_section();
470
471 $this->start_controls_section(
472 'section_title_description',
473 array(
474 'label' => __( 'Title & Description', 'premium-addons-for-elementor' ),
475 'tab' => Controls_Manager::TAB_STYLE,
476 )
477 );
478
479 $this->add_responsive_control(
480 'title_desc_align',
481 array(
482 'label' => __( 'Alignment', 'premium-addons-for-elementor' ),
483 'type' => Controls_Manager::CHOOSE,
484 'options' => array(
485 'flex-start' => array(
486 'title' => __( 'Left', 'premium-addons-for-elementor' ),
487 'icon' => 'eicon-text-align-left',
488 ),
489 'center' => array(
490 'title' => __( 'Center', 'premium-addons-for-elementor' ),
491 'icon' => 'eicon-text-align-center',
492 ),
493 'flex-end' => array(
494 'title' => __( 'Right', 'premium-addons-for-elementor' ),
495 'icon' => 'eicon-text-align-right',
496 ),
497 ),
498 'default' => 'center',
499 'toggle' => false,
500 'selectors' => array(
501 '{{WRAPPER}} .premium-cf-head' => 'align-items: {{VALUE}};',
502 ),
503 )
504 );
505
506 $this->add_control(
507 'title_heading',
508 array(
509 'label' => __( 'Title', 'premium-addons-for-elementor' ),
510 'type' => Controls_Manager::HEADING,
511 'condition' => array(
512 'form_title' => 'yes',
513 ),
514 )
515 );
516
517 $this->add_control(
518 'title_color',
519 array(
520 'label' => __( 'Color', 'premium-addons-for-elementor' ),
521 'type' => Controls_Manager::COLOR,
522 'selectors' => array(
523 '{{WRAPPER}} .premium-cf7-title' => 'color: {{VALUE}}',
524 ),
525 'condition' => array(
526 'form_title' => 'yes',
527 ),
528 )
529 );
530
531 $this->add_group_control(
532 Group_Control_Typography::get_type(),
533 array(
534 'name' => 'title_typography',
535 'selector' => '{{WRAPPER}} .premium-cf7-title',
536 'condition' => array(
537 'form_title' => 'yes',
538 ),
539 )
540 );
541
542 $this->add_group_control(
543 Group_Control_Text_Shadow::get_type(),
544 array(
545 'name' => 'title_shadow',
546 'selector' => '{{WRAPPER}} .premium-cf7-title',
547 'condition' => array(
548 'form_title' => 'yes',
549 ),
550 )
551 );
552
553 $this->add_responsive_control(
554 'title_margin',
555 array(
556 'label' => __( 'Margin', 'premium-addons-for-elementor' ),
557 'type' => Controls_Manager::DIMENSIONS,
558 'size_units' => array( 'px', 'em', '%' ),
559 'selectors' => array(
560 '{{WRAPPER}} .premium-cf7-title' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
561 ),
562 'condition' => array(
563 'form_title' => 'yes',
564 ),
565 )
566 );
567
568 $this->add_control(
569 'description_heading',
570 array(
571 'label' => __( 'Description', 'premium-addons-for-elementor' ),
572 'type' => Controls_Manager::HEADING,
573 'condition' => array(
574 'form_description' => 'yes',
575 ),
576 )
577 );
578
579 $this->add_control(
580 'description_color',
581 array(
582 'label' => __( 'Color', 'premium-addons-for-elementor' ),
583 'type' => Controls_Manager::COLOR,
584 'selectors' => array(
585 '{{WRAPPER}} .premium-cf7-description' => 'color: {{VALUE}}',
586 ),
587 'condition' => array(
588 'form_description' => 'yes',
589 ),
590 )
591 );
592
593 $this->add_group_control(
594 Group_Control_Typography::get_type(),
595 array(
596 'name' => 'description_typography',
597 'selector' => '{{WRAPPER}} .premium-cf7-description',
598 'condition' => array(
599 'form_description' => 'yes',
600 ),
601 )
602 );
603
604 $this->add_group_control(
605 Group_Control_Text_Shadow::get_type(),
606 array(
607 'name' => 'description_shadow',
608 'selector' => '{{WRAPPER}} .premium-cf7-description',
609 'condition' => array(
610 'form_description' => 'yes',
611 ),
612 )
613 );
614
615 $this->add_responsive_control(
616 'description_margin',
617 array(
618 'label' => __( 'Margin', 'premium-addons-for-elementor' ),
619 'type' => Controls_Manager::DIMENSIONS,
620 'size_units' => array( 'px', 'em', '%' ),
621 'selectors' => array(
622 '{{WRAPPER}} .premium-cf7-description' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
623 ),
624 'condition' => array(
625 'form_description' => 'yes',
626 ),
627 )
628 );
629
630 $this->end_controls_section();
631
632 $this->start_controls_section(
633 'section_fields_styles',
634 array(
635 'label' => __( 'Input/Textarea', 'premium-addons-for-elementor' ),
636 'tab' => Controls_Manager::TAB_STYLE,
637 )
638 );
639
640 $this->add_control(
641 'field_color',
642 array(
643 'label' => __( 'Color', 'premium-addons-for-elementor' ),
644 'type' => Controls_Manager::COLOR,
645 'selectors' => array(
646 '{{WRAPPER}} .premium-cf7-container .wpcf7-form-control.wpcf7-text, {{WRAPPER}} .premium-cf7-container .wpcf7-form-control.wpcf7-quiz, {{WRAPPER}} .premium-cf7-container .wpcf7-form-control.wpcf7-date, {{WRAPPER}} .premium-cf7-container .wpcf7-form-control.wpcf7-textarea' => 'color: {{VALUE}}',
647 ),
648 )
649 );
650
651 $this->add_group_control(
652 Group_Control_Typography::get_type(),
653 array(
654 'name' => 'field_typography',
655 'selector' => '{{WRAPPER}} .premium-cf7-container .wpcf7-form-control.wpcf7-text, {{WRAPPER}} .premium-cf7-container .wpcf7-form-control.wpcf7-quiz, {{WRAPPER}} .premium-cf7-container .wpcf7-form-control.wpcf7-quiz, {{WRAPPER}} .premium-cf7-container .wpcf7-form-control.wpcf7-textarea',
656 )
657 );
658
659 $this->add_responsive_control(
660 'text_indent',
661 array(
662 'label' => __( 'Text Indent', 'premium-addons-for-elementor' ),
663 'type' => Controls_Manager::SLIDER,
664 'size_units' => array( 'px', 'em', '%', 'custom' ),
665 'range' => array(
666 'px' => array(
667 'min' => 0,
668 'max' => 60,
669 ),
670 '%' => array(
671 'min' => 0,
672 'max' => 30,
673 ),
674 ),
675 'selectors' => array(
676 '{{WRAPPER}} .premium-cf7-container .wpcf7-form-control.wpcf7-text, {{WRAPPER}} .premium-cf7-container .wpcf7-form-control.wpcf7-quiz, {{WRAPPER}} .premium-cf7-container .wpcf7-form-control.wpcf7-textarea, {{WRAPPER}} .premium-cf7-container .wpcf7-form-control.wpcf7-date' => 'text-indent: {{SIZE}}{{UNIT}}',
677 ),
678 )
679 );
680
681 $this->add_responsive_control(
682 'input_width',
683 array(
684 'label' => __( 'Input Width', 'premium-addons-for-elementor' ),
685 'type' => Controls_Manager::SLIDER,
686 'size_units' => array( 'px', 'em', '%', 'custom' ),
687 'range' => array(
688 'px' => array(
689 'min' => 0,
690 'max' => 1200,
691 ),
692 ),
693 'selectors' => array(
694 '{{WRAPPER}} .premium-cf7-container .wpcf7-form-control.wpcf7-text, {{WRAPPER}} .premium-cf7-container .wpcf7-form-control.wpcf7-quiz, {{WRAPPER}} .premium-cf7-container .wpcf7-form-control.wpcf7-date' => 'width: {{SIZE}}{{UNIT}}',
695 ),
696 )
697 );
698
699 $this->add_responsive_control(
700 'input_height',
701 array(
702 'label' => __( 'Input Height', 'premium-addons-for-elementor' ),
703 'type' => Controls_Manager::SLIDER,
704 'size_units' => array( 'px', 'em', '%', 'custom' ),
705 'range' => array(
706 'px' => array(
707 'min' => 0,
708 'max' => 1200,
709 ),
710 ),
711 'selectors' => array(
712 '{{WRAPPER}} .premium-cf7-container .wpcf7-form-control.wpcf7-text, {{WRAPPER}} .premium-cf7-container .wpcf7-form-control.wpcf7-quiz, {{WRAPPER}} .premium-cf7-container .wpcf7-form-control.wpcf7-date' => 'height: {{SIZE}}{{UNIT}}',
713 ),
714 )
715 );
716
717 $this->add_responsive_control(
718 'textarea_width',
719 array(
720 'label' => __( 'Textarea Width', 'premium-addons-for-elementor' ),
721 'type' => Controls_Manager::SLIDER,
722 'size_units' => array( 'px', 'em', '%', 'custom' ),
723 'range' => array(
724 'px' => array(
725 'min' => 0,
726 'max' => 1200,
727 ),
728 ),
729 'selectors' => array(
730 '{{WRAPPER}} .premium-cf7-container .wpcf7-form-control.wpcf7-textarea' => 'width: {{SIZE}}{{UNIT}}',
731 ),
732 )
733 );
734
735 $this->add_responsive_control(
736 'textarea_height',
737 array(
738 'label' => __( 'Textarea Height', 'premium-addons-for-elementor' ),
739 'type' => Controls_Manager::SLIDER,
740 'size_units' => array( 'px', 'em', '%', 'custom' ),
741 'range' => array(
742 'px' => array(
743 'min' => 0,
744 'max' => 1200,
745 ),
746 ),
747 'selectors' => array(
748 '{{WRAPPER}} .premium-cf7-container .wpcf7-form-control.wpcf7-textarea' => 'height: {{SIZE}}{{UNIT}}',
749 ),
750 )
751 );
752
753 // IMPORTANT: CHECK THIS
754 $this->add_responsive_control(
755 'input_spacing',
756 array(
757 'label' => __( 'Bottom Spacing', 'premium-addons-for-elementor' ),
758 'type' => Controls_Manager::SLIDER,
759 'size_units' => array( 'px', 'em', '%', 'custom' ),
760 'range' => array(
761 'px' => array(
762 'min' => 0,
763 'max' => 100,
764 ),
765 ),
766 'selectors' => array(
767 '{{WRAPPER}} .premium-cf7-container .wpcf7-form-control:not(.wpcf7-submit)' => 'margin-bottom: {{SIZE}}{{UNIT}}',
768 ),
769 )
770 );
771
772 $this->add_responsive_control(
773 'field_padding',
774 array(
775 'label' => __( 'Padding', 'premium-addons-for-elementor' ),
776 'type' => Controls_Manager::DIMENSIONS,
777 'size_units' => array( 'px', 'em', '%', 'custom' ),
778 'selectors' => array(
779 '{{WRAPPER}} .premium-cf7-container .wpcf7-form-control.wpcf7-text, {{WRAPPER}} .premium-cf7-container .wpcf7-form-control.wpcf7-quiz, {{WRAPPER}} .premium-cf7-container .wpcf7-form-control.wpcf7-date, {{WRAPPER}} .premium-cf7-container .wpcf7-form-control.wpcf7-textarea' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
780 ),
781 )
782 );
783
784 $this->start_controls_tabs( 'tabs_fields_style' );
785
786 $this->start_controls_tab(
787 'tab_fields_normal',
788 array(
789 'label' => __( 'Normal', 'premium-addons-for-elementor' ),
790 )
791 );
792
793 $this->add_control(
794 'field_bg',
795 array(
796 'label' => __( 'Background Color', 'premium-addons-for-elementor' ),
797 'type' => Controls_Manager::COLOR,
798 'selectors' => array(
799 '{{WRAPPER}} .premium-cf7-container .wpcf7-form-control.wpcf7-text, {{WRAPPER}} .premium-cf7-container .wpcf7-form-control.wpcf7-quiz, {{WRAPPER}} .premium-cf7-container .wpcf7-form-control.wpcf7-date, {{WRAPPER}} .premium-cf7-container .wpcf7-form-control.wpcf7-textarea' => 'background-color: {{VALUE}}',
800 ),
801 )
802 );
803
804 $this->add_control(
805 'fields_lq_effect',
806 array(
807 'label' => __( 'Liquid Glass Effect', 'premium-addons-for-elementor' ),
808 'type' => Controls_Manager::SELECT,
809 'description' => sprintf(
810 /* translators: 1: `<a>` opening tag, 2: `</a>` closing tag. */
811 esc_html__( 'Important: Make sure this element has a semi-transparent background color to see the effect. See all presets from %1$shere%2$s.', 'premium-addons-for-elementor' ),
812 '<a href="https://premiumaddons.com/liquid-glass/" target="_blank">',
813 '</a>'
814 ),
815 'options' => array(
816 'none' => __( 'None', 'premium-addons-for-elementor' ),
817 'glass1' => __( 'Preset 01', 'premium-addons-for-elementor' ),
818 'glass2' => __( 'Preset 02', 'premium-addons-for-elementor' ),
819 'glass3' => apply_filters( 'pa_pro_label', __( 'Preset 03 (Pro)', 'premium-addons-for-elementor' ) ),
820 'glass4' => apply_filters( 'pa_pro_label', __( 'Preset 04 (Pro)', 'premium-addons-for-elementor' ) ),
821 'glass5' => apply_filters( 'pa_pro_label', __( 'Preset 05 (Pro)', 'premium-addons-for-elementor' ) ),
822 'glass6' => apply_filters( 'pa_pro_label', __( 'Preset 06 (Pro)', 'premium-addons-for-elementor' ) ),
823 ),
824 'default' => 'none',
825 'label_block' => true,
826 )
827 );
828
829 $this->add_group_control(
830 Group_Control_Border::get_type(),
831 array(
832 'name' => 'field_border',
833 'selector' => '{{WRAPPER}} .premium-cf7-container .wpcf7-form-control.wpcf7-text, {{WRAPPER}} .premium-cf7-container .wpcf7-form-control.wpcf7-quiz, {{WRAPPER}} .premium-cf7-container .wpcf7-form-control.wpcf7-date, {{WRAPPER}} .premium-cf7-container .wpcf7-form-control.wpcf7-textarea',
834 )
835 );
836
837 $this->add_control(
838 'field_radius',
839 array(
840 'label' => __( 'Border Radius', 'premium-addons-for-elementor' ),
841 'type' => Controls_Manager::DIMENSIONS,
842 'size_units' => array( 'px', 'em', '%' ),
843 'selectors' => array(
844 '{{WRAPPER}} .premium-cf7-container .wpcf7-form-control.wpcf7-text, {{WRAPPER}} .premium-cf7-container .wpcf7-form-control.wpcf7-quiz, {{WRAPPER}} .premium-cf7-container .wpcf7-form-control.wpcf7-date, {{WRAPPER}} .premium-cf7-container .wpcf7-form-control.wpcf7-textarea' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
845 ),
846 )
847 );
848
849 $this->add_group_control(
850 Group_Control_Box_Shadow::get_type(),
851 array(
852 'name' => 'field_box_shadow',
853 'selector' => '{{WRAPPER}} .premium-cf7-container .wpcf7-form-control.wpcf7-text, {{WRAPPER}} .premium-cf7-container .wpcf7-form-control.wpcf7-quiz, {{WRAPPER}} .premium-cf7-container .wpcf7-form-control.wpcf7-textarea',
854 )
855 );
856
857 $this->end_controls_tab();
858
859 $this->start_controls_tab(
860 'tab_fields_focus',
861 array(
862 'label' => __( 'Focus', 'premium-addons-for-elementor' ),
863 )
864 );
865
866 $this->add_control(
867 'field_bg_focus',
868 array(
869 'label' => __( 'Background Color', 'premium-addons-for-elementor' ),
870 'type' => Controls_Manager::COLOR,
871 'selectors' => array(
872 '{{WRAPPER}} .premium-cf7-container .wpcf7-form input:focus, {{WRAPPER}} .premium-cf7-container .wpcf7-form textarea:focus' => 'background-color: {{VALUE}}',
873 ),
874 )
875 );
876
877 $this->add_group_control(
878 Group_Control_Border::get_type(),
879 array(
880 'name' => 'input_border_focus',
881 'selector' => '{{WRAPPER}} .premium-cf7-container .wpcf7-form input:focus, {{WRAPPER}} .premium-cf7-container .wpcf7-form textarea:focus',
882 )
883 );
884
885 $this->add_group_control(
886 Group_Control_Box_Shadow::get_type(),
887 array(
888 'name' => 'focus_box_shadow',
889 'selector' => '{{WRAPPER}} .premium-cf7-container .wpcf7-form input:focus, {{WRAPPER}} .premium-cf7-container .wpcf7-form textarea:focus',
890 )
891 );
892
893 $this->end_controls_tab();
894
895 $this->end_controls_tabs();
896
897 $this->end_controls_section();
898
899 $this->start_controls_section(
900 'section_select_style',
901 array(
902 'label' => __( 'Select', 'premium-addons-for-elementor' ),
903 'tab' => Controls_Manager::TAB_STYLE,
904 )
905 );
906
907 $this->add_responsive_control(
908 'select_width',
909 array(
910 'label' => __( 'Width', 'premium-addons-for-elementor' ),
911 'type' => Controls_Manager::SLIDER,
912 'size_units' => array( 'px', 'em', '%', 'custom' ),
913 'range' => array(
914 'px' => array(
915 'min' => 0,
916 'max' => 1200,
917 ),
918 ),
919 'selectors' => array(
920 '{{WRAPPER}} .premium-cf7-container .wpcf7-form-control.wpcf7-select' => 'width: {{SIZE}}{{UNIT}}',
921 ),
922 )
923 );
924
925 $this->add_responsive_control(
926 'select_height',
927 array(
928 'label' => __( 'Height', 'premium-addons-for-elementor' ),
929 'type' => Controls_Manager::SLIDER,
930 'size_units' => array( 'px', 'em', '%', 'custom' ),
931 'range' => array(
932 'px' => array(
933 'min' => 0,
934 'max' => 1200,
935 ),
936 ),
937 'selectors' => array(
938 '{{WRAPPER}} .premium-cf7-container .wpcf7-form-control.wpcf7-select' => 'height: {{SIZE}}{{UNIT}}',
939 ),
940 )
941 );
942
943 $this->add_control(
944 'select_field_color',
945 array(
946 'label' => __( 'Color', 'premium-addons-for-elementor' ),
947 'type' => Controls_Manager::COLOR,
948 'selectors' => array(
949 '{{WRAPPER}} .premium-cf7-container .wpcf7-form-control.wpcf7-select' => 'color: {{VALUE}}',
950 ),
951 )
952 );
953
954 $this->add_group_control(
955 Group_Control_Typography::get_type(),
956 array(
957 'name' => 'select_field_typography',
958 'selector' => '{{WRAPPER}} .premium-cf7-container .wpcf7-form-control.wpcf7-select',
959 )
960 );
961
962 $this->add_control(
963 'select_field_bg',
964 array(
965 'label' => __( 'Background Color', 'premium-addons-for-elementor' ),
966 'type' => Controls_Manager::COLOR,
967 'selectors' => array(
968 '{{WRAPPER}} .premium-cf7-container .wpcf7-form-control.wpcf7-select' => 'background-color: {{VALUE}}',
969 ),
970 )
971 );
972
973 $this->add_responsive_control(
974 'select_text_indent',
975 array(
976 'label' => __( 'Text Indent', 'premium-addons-for-elementor' ),
977 'type' => Controls_Manager::SLIDER,
978 'size_units' => array( 'px', 'em', '%', 'custom' ),
979 'range' => array(
980 'px' => array(
981 'min' => 0,
982 'max' => 60,
983 ),
984 '%' => array(
985 'min' => 0,
986 'max' => 30,
987 ),
988 ),
989 'selectors' => array(
990 '{{WRAPPER}} .premium-cf7-container .wpcf7-form-control.wpcf7-select' => 'text-indent: {{SIZE}}{{UNIT}}',
991 ),
992 )
993 );
994
995 $this->add_group_control(
996 Group_Control_Border::get_type(),
997 array(
998 'name' => 'select_field_border',
999 'selector' => '{{WRAPPER}} .premium-cf7-container .wpcf7-form-control.wpcf7-select',
1000 )
1001 );
1002
1003 $this->add_control(
1004 'select_field_radius',
1005 array(
1006 'label' => __( 'Border Radius', 'premium-addons-for-elementor' ),
1007 'type' => Controls_Manager::DIMENSIONS,
1008 'size_units' => array( 'px', 'em', '%' ),
1009 'selectors' => array(
1010 '{{WRAPPER}} .premium-cf7-container .wpcf7-form-control.wpcf7-select' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1011 ),
1012 )
1013 );
1014
1015 $this->add_group_control(
1016 Group_Control_Box_Shadow::get_type(),
1017 array(
1018 'name' => 'selectfield_box_shadow',
1019 'selector' => '{{WRAPPER}} .premium-cf7-container .wpcf7-form-control.wpcf7-select',
1020 )
1021 );
1022
1023 $this->end_controls_section();
1024
1025 $this->start_controls_section(
1026 'section_radio_checkbox_style',
1027 array(
1028 'label' => __( 'Radio/Checkbox', 'premium-addons-for-elementor' ),
1029 'tab' => Controls_Manager::TAB_STYLE,
1030 )
1031 );
1032
1033 $this->add_control(
1034 'custom_select_style',
1035 array(
1036 'label' => __( 'Custom Radio/Checkbox Style', 'premium-addons-for-elementor' ),
1037 'type' => Controls_Manager::SWITCHER,
1038 'prefix_class' => 'premium-cf7-cselect-',
1039 )
1040 );
1041
1042 $this->add_control(
1043 'radio_display',
1044 array(
1045 'label' => __( 'Display', 'premium-addons-for-elementor' ),
1046 'type' => Controls_Manager::SELECT,
1047 'options' => array(
1048 '' => __( 'Default', 'premium-addons-for-elementor' ),
1049 'row' => __( 'Inline', 'premium-addons-for-elementor' ),
1050 'column' => __( 'Block', 'premium-addons-for-elementor' ),
1051 ),
1052 'default' => '',
1053 'selectors' => array(
1054 '{{WRAPPER}} .premium-cf7-container .wpcf7-radio' => 'flex-direction: {{VALUE}}',
1055 ),
1056 )
1057 );
1058
1059 $this->add_responsive_control(
1060 'radio_checkbox_size',
1061 array(
1062 'label' => __( 'Size', 'premium-addons-for-elementor' ),
1063 'type' => Controls_Manager::SLIDER,
1064 'size_units' => array( 'px', 'em', '%' ),
1065 'default' => array(
1066 'size' => '15',
1067 'unit' => 'px',
1068 ),
1069 'range' => array(
1070 'px' => array(
1071 'min' => 0,
1072 'max' => 80,
1073 ),
1074 ),
1075 'selectors' => array(
1076 '{{WRAPPER}} .premium-cf7-container input[type="checkbox"], {{WRAPPER}} .premium-cf7-container input[type="radio"]' => 'width: {{SIZE}}{{UNIT}}; height: {{SIZE}}{{UNIT}}',
1077 ),
1078 'condition' => array(
1079 'custom_select_style' => 'yes',
1080 ),
1081 )
1082 );
1083
1084 $this->add_control(
1085 'radio_checkbox_text_color',
1086 array(
1087 'label' => __( 'Text Color', 'premium-addons-for-elementor' ),
1088 'type' => Controls_Manager::COLOR,
1089 'selectors' => array(
1090 '{{WRAPPER}} .premium-cf7-container .wpcf7-list-item-label' => 'color: {{VALUE}}',
1091 ),
1092 )
1093 );
1094
1095 $this->add_group_control(
1096 Group_Control_Typography::get_type(),
1097 array(
1098 'name' => 'radio_checkbox_typography',
1099 'selector' => '{{WRAPPER}} .premium-cf7-container .wpcf7-list-item-label',
1100 )
1101 );
1102
1103 $this->add_control(
1104 'radio_checkbox_color',
1105 array(
1106 'label' => __( 'Color', 'premium-addons-for-elementor' ),
1107 'type' => Controls_Manager::COLOR,
1108 'selectors' => array(
1109 '{{WRAPPER}} .premium-cf7-container input[type="checkbox"], {{WRAPPER}} .premium-cf7-container input[type="radio"]' => 'background: {{VALUE}}',
1110 ),
1111 'condition' => array(
1112 'custom_select_style' => 'yes',
1113 ),
1114 )
1115 );
1116
1117 $this->add_control(
1118 'radio_checkbox_color_checked',
1119 array(
1120 'label' => __( 'Checked Option Color', 'premium-addons-for-elementor' ),
1121 'type' => Controls_Manager::COLOR,
1122 'selectors' => array(
1123 '{{WRAPPER}} .premium-cf7-container input[type="checkbox"]:checked:before, {{WRAPPER}} .premium-cf7-container input[type="radio"]:checked:before' => 'background: {{VALUE}}',
1124 ),
1125 'condition' => array(
1126 'custom_select_style' => 'yes',
1127 ),
1128 )
1129 );
1130
1131 $this->add_responsive_control(
1132 'radio_checkbox_border_width',
1133 array(
1134 'label' => __( 'Border Width', 'premium-addons-for-elementor' ),
1135 'type' => Controls_Manager::SLIDER,
1136 'selectors' => array(
1137 '{{WRAPPER}} .premium-cf7-container input[type="checkbox"], {{WRAPPER}} .premium-cf7-container input[type="radio"]' => 'border-width: {{SIZE}}{{UNIT}}',
1138 ),
1139 'condition' => array(
1140 'custom_select_style' => 'yes',
1141 ),
1142 )
1143 );
1144
1145 $this->add_control(
1146 'radio_checkbox_border_color',
1147 array(
1148 'label' => __( 'Border Color', 'premium-addons-for-elementor' ),
1149 'type' => Controls_Manager::COLOR,
1150 'selectors' => array(
1151 '{{WRAPPER}} .premium-cf7-container [type="checkbox"], {{WRAPPER}} .premium-cf7-container [type="radio"]' => 'border-color: {{VALUE}}',
1152 ),
1153 'condition' => array(
1154 'custom_select_style' => 'yes',
1155 ),
1156 )
1157 );
1158
1159 $this->add_responsive_control(
1160 'check_radio_margin',
1161 array(
1162 'label' => __( 'Margin', 'premium-addons-for-elementor' ),
1163 'type' => Controls_Manager::DIMENSIONS,
1164 'size_units' => array( 'px', 'em', '%' ),
1165 'selectors' => array(
1166 '{{WRAPPER}} .premium-cf7-container .wpcf7-list-item' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1167 ),
1168 'condition' => array(
1169 'custom_select_style' => 'yes',
1170 ),
1171 )
1172 );
1173
1174 $this->add_control(
1175 'checkbox_heading',
1176 array(
1177 'label' => __( 'Checkboxes', 'premium-addons-for-elementor' ),
1178 'type' => Controls_Manager::HEADING,
1179 'condition' => array(
1180 'custom_select_style' => 'yes',
1181 ),
1182
1183 )
1184 );
1185
1186 $this->add_control(
1187 'checkbox_border_radius',
1188 array(
1189 'label' => __( 'Border Radius', 'premium-addons-for-elementor' ),
1190 'type' => Controls_Manager::DIMENSIONS,
1191 'size_units' => array( 'px', 'em', '%' ),
1192 'selectors' => array(
1193 '{{WRAPPER}} .premium-cf7-container [type="checkbox"], {{WRAPPER}} .premium-cf7-container [type="checkbox"]:before' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1194 ),
1195 'condition' => array(
1196 'custom_select_style' => 'yes',
1197 ),
1198 )
1199 );
1200
1201 $this->add_control(
1202 'radio_heading',
1203 array(
1204 'label' => __( 'Radio Buttons', 'premium-addons-for-elementor' ),
1205 'type' => Controls_Manager::HEADING,
1206 'condition' => array(
1207 'custom_select_style' => 'yes',
1208 ),
1209 )
1210 );
1211
1212 $this->add_control(
1213 'radio_border_radius',
1214 array(
1215 'label' => __( 'Border Radius', 'premium-addons-for-elementor' ),
1216 'type' => Controls_Manager::DIMENSIONS,
1217 'size_units' => array( 'px', 'em', '%' ),
1218 'selectors' => array(
1219 '{{WRAPPER}} .premium-cf7-container input[type="radio"], {{WRAPPER}} .premium-cf7-container input[type="radio"]:before' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1220 ),
1221 'condition' => array(
1222 'custom_select_style' => 'yes',
1223 ),
1224 )
1225 );
1226
1227 $this->end_controls_section();
1228
1229 $this->start_controls_section(
1230 'section_placeholder_style',
1231 array(
1232 'label' => __( 'Placeholder', 'premium-addons-for-elementor' ),
1233 'tab' => Controls_Manager::TAB_STYLE,
1234 'condition' => array(
1235 'fields_effects!' => 'label',
1236 ),
1237 )
1238 );
1239
1240 $this->add_control(
1241 'placeholder_switch',
1242 array(
1243 'label' => __( 'Hide Placeholder', 'premium-addons-for-elementor' ),
1244 'type' => Controls_Manager::SWITCHER,
1245 'prefix_class' => 'premium-cf7-placeholder-hide-',
1246 )
1247 );
1248
1249 $this->add_control(
1250 'placeholder_color',
1251 array(
1252 'label' => __( 'Color', 'premium-addons-for-elementor' ),
1253 'type' => Controls_Manager::COLOR,
1254 'selectors' => array(
1255 '{{WRAPPER}} .premium-cf7-container .wpcf7-form-control::placeholder' => 'color: {{VALUE}}',
1256 ),
1257 'condition' => array(
1258 'placeholder_switch!' => 'yes',
1259 ),
1260 )
1261 );
1262
1263 $this->add_group_control(
1264 Group_Control_Typography::get_type(),
1265 array(
1266 'name' => 'typography_placeholder',
1267 'selector' => '{{WRAPPER}} .premium-cf7-container .wpcf7-form-control::placeholder',
1268 'condition' => array(
1269 'placeholder_switch!' => 'yes',
1270 ),
1271 )
1272 );
1273
1274 $this->end_controls_section();
1275
1276 $this->start_controls_section(
1277 'section_errors_style',
1278 array(
1279 'label' => __( 'Errors', 'premium-addons-for-elementor' ),
1280 'tab' => Controls_Manager::TAB_STYLE,
1281 )
1282 );
1283
1284 $this->start_controls_tabs( 'tabs_error_messages_style' );
1285
1286 $this->start_controls_tab(
1287 'tab_error_messages_alert',
1288 array(
1289 'label' => __( 'Alert', 'premium-addons-for-elementor' ),
1290 )
1291 );
1292
1293 $this->add_control(
1294 'error_alert_color',
1295 array(
1296 'label' => __( 'Color', 'premium-addons-for-elementor' ),
1297 'type' => Controls_Manager::COLOR,
1298 'selectors' => array(
1299 '{{WRAPPER}} .premium-cf7-container .wpcf7-not-valid-tip' => 'color: {{VALUE}}',
1300 ),
1301 )
1302 );
1303
1304 $this->add_group_control(
1305 Group_Control_Typography::get_type(),
1306 array(
1307 'name' => 'error_alert_typography',
1308 'selector' => '{{WRAPPER}} .premium-cf7-container .wpcf7-not-valid-tip',
1309 )
1310 );
1311
1312 $this->add_control(
1313 'error_alert_bg_color',
1314 array(
1315 'label' => __( 'Background Color', 'premium-addons-for-elementor' ),
1316 'type' => Controls_Manager::COLOR,
1317 'selectors' => array(
1318 '{{WRAPPER}} .premium-cf7-container .wpcf7-not-valid-tip' => 'background: {{VALUE}}',
1319 ),
1320 )
1321 );
1322
1323 $this->add_group_control(
1324 Group_Control_Border::get_type(),
1325 array(
1326 'name' => 'error_alert_border',
1327 'selector' => '{{WRAPPER}} .premium-cf7-container .wpcf7-not-valid-tip',
1328 )
1329 );
1330
1331 $this->add_responsive_control(
1332 'error_top_spacing',
1333 array(
1334 'label' => __( 'Top Spacing', 'premium-addons-for-elementor' ),
1335 'type' => Controls_Manager::SLIDER,
1336 'size_units' => array( 'px', 'em', '%' ),
1337 'selectors' => array(
1338 '{{WRAPPER}} .premium-cf7-container .wpcf7-not-valid-tip' => 'margin-top: {{SIZE}}{{UNIT}}',
1339 ),
1340 )
1341 );
1342
1343 $this->add_responsive_control(
1344 'error_alert_padding',
1345 array(
1346 'label' => __( 'Padding', 'premium-addons-for-elementor' ),
1347 'type' => Controls_Manager::DIMENSIONS,
1348 'size_units' => array( 'px', 'em', '%' ),
1349 'selectors' => array(
1350 '{{WRAPPER}} .premium-cf7-container .wpcf7-not-valid-tip' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1351 ),
1352 )
1353 );
1354
1355 $this->end_controls_tab();
1356
1357 $this->start_controls_tab(
1358 'tab_error_messages_fields',
1359 array(
1360 'label' => __( 'Fields', 'premium-addons-for-elementor' ),
1361 )
1362 );
1363
1364 $this->add_control(
1365 'error_field_bg_color',
1366 array(
1367 'label' => __( 'Background Color', 'premium-addons-for-elementor' ),
1368 'type' => Controls_Manager::COLOR,
1369 'default' => '',
1370 'selectors' => array(
1371 '{{WRAPPER}} .premium-cf7-container .wpcf7-not-valid' => 'background: {{VALUE}}',
1372 ),
1373 )
1374 );
1375
1376 $this->add_control(
1377 'error_field_color',
1378 array(
1379 'label' => __( 'Text Color', 'premium-addons-for-elementor' ),
1380 'type' => Controls_Manager::COLOR,
1381 'default' => '',
1382 'selectors' => array(
1383 '{{WRAPPER}} .premium-cf7-container .wpcf7-not-valid.wpcf7-text' => 'color: {{VALUE}}',
1384 ),
1385 )
1386 );
1387
1388 $this->add_group_control(
1389 Group_Control_Border::get_type(),
1390 array(
1391 'name' => 'error_field_border',
1392 'selector' => '{{WRAPPER}} .premium-cf7-container .wpcf7-not-valid',
1393 'separator' => 'before',
1394 )
1395 );
1396
1397 $this->end_controls_tab();
1398
1399 $this->end_controls_tabs();
1400
1401 $this->end_controls_section();
1402
1403 $this->start_controls_section(
1404 'section_contact_form_submit_button_styles',
1405 array(
1406 'label' => __( 'Submit Button', 'premium-addons-for-elementor' ),
1407 'tab' => Controls_Manager::TAB_STYLE,
1408 )
1409 );
1410
1411 $this->add_control(
1412 'button_full_width',
1413 array(
1414 'label' => __( 'Full Width', 'premium-addons-for-elementor' ),
1415 'type' => Controls_Manager::SWITCHER,
1416 'default' => 'yes',
1417 'prefix_class' => 'premium-cf7-button-fwidth-',
1418 )
1419 );
1420
1421 $this->add_responsive_control(
1422 'button_align',
1423 array(
1424 'label' => __( 'Alignment', 'premium-addons-for-elementor' ),
1425 'type' => Controls_Manager::CHOOSE,
1426 'default' => 'left',
1427 'options' => array(
1428 'left' => array(
1429 'title' => __( 'Left', 'premium-addons-for-elementor' ),
1430 'icon' => 'eicon-h-align-left',
1431 ),
1432 'center' => array(
1433 'title' => __( 'Center', 'premium-addons-for-elementor' ),
1434 'icon' => 'eicon-h-align-center',
1435 ),
1436 'right' => array(
1437 'title' => __( 'Right', 'premium-addons-for-elementor' ),
1438 'icon' => 'eicon-h-align-right',
1439 ),
1440 ),
1441 // 'prefix_class' => 'premium-cf7-button-align-',
1442 'condition' => array(
1443 'button_full_width!' => 'yes',
1444 ),
1445 'selectors' => array(
1446 '{{WRAPPER}} .premium-cf7-container p.premium-cf-submit' => 'text-align: {{VALUE}}',
1447 ),
1448 )
1449 );
1450
1451 $this->add_responsive_control(
1452 'button_width',
1453 array(
1454 'label' => __( 'Width', 'premium-addons-for-elementor' ),
1455 'type' => Controls_Manager::SLIDER,
1456 'size_units' => array( 'px', 'em', '%', 'custom' ),
1457 'range' => array(
1458 'px' => array(
1459 'min' => 0,
1460 'max' => 1200,
1461 'step' => 1,
1462 ),
1463 ),
1464 'selectors' => array(
1465 '{{WRAPPER}} .premium-cf7-container input.wpcf7-submit' => 'width: {{SIZE}}{{UNIT}}',
1466 ),
1467 'condition' => array(
1468 'button_full_width!' => 'yes',
1469 ),
1470 )
1471 );
1472
1473 $this->add_group_control(
1474 Group_Control_Typography::get_type(),
1475 array(
1476 'name' => 'submit_button_typography',
1477 'selector' => '{{WRAPPER}} .premium-cf7-container input.wpcf7-submit',
1478 )
1479 );
1480
1481 $this->start_controls_tabs( 'btn_style_tabs' );
1482
1483 $this->start_controls_tab( 'normal', array( 'label' => __( 'Normal', 'premium-addons-for-elementor' ) ) );
1484
1485 $this->add_control(
1486 'premium_elements_button_text_color',
1487 array(
1488 'label' => __( 'Color', 'premium-addons-for-elementor' ),
1489 'type' => Controls_Manager::COLOR,
1490 'selectors' => array(
1491 '{{WRAPPER}} .premium-cf7-container input.wpcf7-submit' => 'color: {{VALUE}};',
1492 ),
1493 )
1494 );
1495
1496 $this->add_control(
1497 'premium_elements_button_background_color',
1498 array(
1499 'label' => __( 'Background Color', 'premium-addons-for-elementor' ),
1500 'type' => Controls_Manager::COLOR,
1501 'selectors' => array(
1502 '{{WRAPPER}} .premium-cf7-container input.wpcf7-submit' => 'background-color: {{VALUE}};',
1503 ),
1504 )
1505 );
1506
1507 $this->add_control(
1508 'submit_lq_effect',
1509 array(
1510 'label' => __( 'Liquid Glass Effect', 'premium-addons-for-elementor' ),
1511 'type' => Controls_Manager::SELECT,
1512 'description' => sprintf(
1513 /* translators: 1: `<a>` opening tag, 2: `</a>` closing tag. */
1514 esc_html__( 'Important: Make sure this element has a semi-transparent background color to see the effect. See all presets from %1$shere%2$s.', 'premium-addons-for-elementor' ),
1515 '<a href="https://premiumaddons.com/liquid-glass/" target="_blank">',
1516 '</a>'
1517 ),
1518 'options' => array(
1519 'none' => __( 'None', 'premium-addons-for-elementor' ),
1520 'glass1' => __( 'Preset 01', 'premium-addons-for-elementor' ),
1521 'glass2' => __( 'Preset 02', 'premium-addons-for-elementor' ),
1522 'glass3' => apply_filters( 'pa_pro_label', __( 'Preset 03 (Pro)', 'premium-addons-for-elementor' ) ),
1523 'glass4' => apply_filters( 'pa_pro_label', __( 'Preset 04 (Pro)', 'premium-addons-for-elementor' ) ),
1524 'glass5' => apply_filters( 'pa_pro_label', __( 'Preset 05 (Pro)', 'premium-addons-for-elementor' ) ),
1525 'glass6' => apply_filters( 'pa_pro_label', __( 'Preset 06 (Pro)', 'premium-addons-for-elementor' ) ),
1526 ),
1527 'default' => 'none',
1528 'label_block' => true,
1529 )
1530 );
1531
1532 $this->add_group_control(
1533 Group_Control_Border::get_type(),
1534 array(
1535 'name' => 'premium_elements_btn_border',
1536 'selector' => '{{WRAPPER}} .premium-cf7-container input.wpcf7-submit',
1537 )
1538 );
1539
1540 $this->add_responsive_control(
1541 'premium_elements_btn_border_radius',
1542 array(
1543 'label' => __( 'Border Radius', 'premium-addons-for-elementor' ),
1544 'type' => Controls_Manager::SLIDER,
1545 'size_units' => array( 'px', '%', 'em' ),
1546 'selectors' => array(
1547 '{{WRAPPER}} .premium-cf7-container input.wpcf7-submit' => 'border-radius: {{SIZE}}{{UNIT}};',
1548 ),
1549 )
1550 );
1551
1552 $this->add_group_control(
1553 Group_Control_Text_Shadow::get_type(),
1554 array(
1555 'name' => 'submit_text_shadow',
1556 'selector' => '{{WRAPPER}} .premium-cf7-container input.wpcf7-submit',
1557 )
1558 );
1559
1560 $this->add_group_control(
1561 Group_Control_Box_Shadow::get_type(),
1562 array(
1563 'name' => 'button_box_shadow',
1564 'selector' => '{{WRAPPER}} .premium-cf7-container input.wpcf7-submit',
1565 )
1566 );
1567
1568 $this->add_responsive_control(
1569 'submit_margin',
1570 array(
1571 'label' => __( 'Margin', 'premium-addons-for-elementor' ),
1572 'type' => Controls_Manager::DIMENSIONS,
1573 'size_units' => array( 'px', 'em', '%' ),
1574 'selectors' => array(
1575 '{{WRAPPER}} .premium-cf7-container input.wpcf7-submit' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1576 ),
1577 )
1578 );
1579
1580 $this->add_responsive_control(
1581 'submit_padding',
1582 array(
1583 'label' => __( 'Padding', 'premium-addons-for-elementor' ),
1584 'type' => Controls_Manager::DIMENSIONS,
1585 'size_units' => array( 'px', 'em', '%' ),
1586 'selectors' => array(
1587 '{{WRAPPER}} .premium-cf7-container input.wpcf7-submit' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1588 ),
1589 )
1590 );
1591
1592 $this->end_controls_tab();
1593
1594 $this->start_controls_tab(
1595 'premium_elements_hover',
1596 array(
1597 'label' => __( 'Hover', 'premium-addons-for-elementor' ),
1598 )
1599 );
1600
1601 $this->add_control(
1602 'premium_elements_button_hover_text_color',
1603 array(
1604 'label' => __( 'Color', 'premium-addons-for-elementor' ),
1605 'type' => Controls_Manager::COLOR,
1606 'selectors' => array(
1607 '{{WRAPPER}} .premium-cf7-container input.wpcf7-submit:hover' => 'color: {{VALUE}};',
1608 ),
1609 )
1610 );
1611
1612 $this->add_control(
1613 'premium_elements_button_hover_background_color',
1614 array(
1615 'label' => __( 'Background Color', 'premium-addons-for-elementor' ),
1616 'type' => Controls_Manager::COLOR,
1617 'selectors' => array(
1618 '{{WRAPPER}} .premium-cf7-container input.wpcf7-submit:hover' => 'background-color: {{VALUE}};',
1619 ),
1620 )
1621 );
1622
1623 $this->add_group_control(
1624 Group_Control_Border::get_type(),
1625 array(
1626 'name' => 'btn_hover_border',
1627 'selector' => '{{WRAPPER}} .premium-cf7-container input.wpcf7-submit:hover',
1628 )
1629 );
1630
1631 $this->add_responsive_control(
1632 'btn_hoverr_radius',
1633 array(
1634 'label' => __( 'Border Radius', 'premium-addons-for-elementor' ),
1635 'type' => Controls_Manager::SLIDER,
1636 'size_units' => array( 'px', '%', 'em' ),
1637 'selectors' => array(
1638 '{{WRAPPER}} .premium-cf7-container input.wpcf7-submit:hover' => 'border-radius: {{SIZE}}{{UNIT}};',
1639 ),
1640 )
1641 );
1642
1643 $this->add_group_control(
1644 Group_Control_Text_Shadow::get_type(),
1645 array(
1646 'name' => 'submit_hover_text_shadow',
1647 'selector' => '{{WRAPPER}} .premium-cf7-container input.wpcf7-submit:hover',
1648 )
1649 );
1650
1651 $this->add_group_control(
1652 Group_Control_Box_Shadow::get_type(),
1653 array(
1654 'name' => 'button_hover_box_shadow',
1655 'selector' => '{{WRAPPER}} .premium-cf7-container input.wpcf7-submit:hover',
1656 )
1657 );
1658
1659 $this->add_responsive_control(
1660 'submit_hover_margin',
1661 array(
1662 'label' => __( 'Margin', 'premium-addons-for-elementor' ),
1663 'type' => Controls_Manager::DIMENSIONS,
1664 'size_units' => array( 'px', 'em', '%' ),
1665 'selectors' => array(
1666 '{{WRAPPER}} .premium-cf7-container input.wpcf7-submit:hover' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1667 ),
1668 )
1669 );
1670
1671 $this->add_responsive_control(
1672 'submit_hover_padding',
1673 array(
1674 'label' => __( 'Padding', 'premium-addons-for-elementor' ),
1675 'type' => Controls_Manager::DIMENSIONS,
1676 'size_units' => array( 'px', 'em', '%' ),
1677 'selectors' => array(
1678 '{{WRAPPER}} .premium-cf7-container input.wpcf7-submit:hover' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1679 ),
1680 )
1681 );
1682
1683 $this->end_controls_tab();
1684
1685 $this->end_controls_tabs();
1686
1687 $this->end_controls_section();
1688
1689 $this->start_controls_section(
1690 'section_after_submit_style',
1691 array(
1692 'label' => __( 'After Submit Message', 'premium-addons-for-elementor' ),
1693 'tab' => Controls_Manager::TAB_STYLE,
1694 )
1695 );
1696
1697 $this->add_group_control(
1698 Group_Control_Typography::get_type(),
1699 array(
1700 'name' => 'after_submit_typography',
1701 'selector' => '{{WRAPPER}} .premium-cf7-container .wpcf7-mail-sent-ng, {{WRAPPER}} .premium-cf7-container .wpcf7-mail-sent-ok, {{WRAPPER}} .premium-cf7-container .wpcf7-response-output',
1702 )
1703 );
1704
1705 $this->add_control(
1706 'after_submit_color',
1707 array(
1708 'label' => __( 'Color', 'premium-addons-for-elementor' ),
1709 'type' => Controls_Manager::COLOR,
1710 'selectors' => array(
1711 '{{WRAPPER}} .premium-cf7-container .wpcf7-mail-sent-ng, {{WRAPPER}} .premium-cf7-container .wpcf7-mail-sent-ok, {{WRAPPER}} .premium-cf7-container .wpcf7-response-output' => 'color: {{VALUE}}',
1712 ),
1713 )
1714 );
1715
1716 $this->add_control(
1717 'after_submit_bg',
1718 array(
1719 'label' => __( 'Background Color', 'premium-addons-for-elementor' ),
1720 'type' => Controls_Manager::COLOR,
1721 'selectors' => array(
1722 '{{WRAPPER}} .premium-cf7-container .wpcf7-mail-sent-ng, {{WRAPPER}} .premium-cf7-container .wpcf7-mail-sent-ok, {{WRAPPER}} .premium-cf7-container .wpcf7-response-output' => 'background-color: {{VALUE}}',
1723 ),
1724 )
1725 );
1726
1727 $this->add_group_control(
1728 Group_Control_Border::get_type(),
1729 array(
1730 'name' => 'after_submit_border',
1731 'selector' => '{{WRAPPER}} .premium-cf7-container .wpcf7-mail-sent-ng, {{WRAPPER}} .premium-cf7-container .wpcf7-mail-sent-ok, {{WRAPPER}} .premium-cf7-container .wpcf7-response-output',
1732 )
1733 );
1734
1735 $this->add_responsive_control(
1736 'after_submit_radius',
1737 array(
1738 'label' => __( 'Border Radius', 'premium-addons-for-elementor' ),
1739 'type' => Controls_Manager::SLIDER,
1740 'size_units' => array( 'px', 'em', '%' ),
1741 'selectors' => array(
1742 '{{WRAPPER}} .premium-cf7-container .wpcf7-mail-sent-ng, {{WRAPPER}} .premium-cf7-container .wpcf7-mail-sent-ok, {{WRAPPER}} .premium-cf7-container .wpcf7-response-output' => 'border-radius: {{SIZE}}{{UNIT}};',
1743 ),
1744 )
1745 );
1746
1747 $this->add_responsive_control(
1748 'after_submit_margin',
1749 array(
1750 'label' => __( 'Margin', 'premium-addons-for-elementor' ),
1751 'type' => Controls_Manager::DIMENSIONS,
1752 'size_units' => array( 'px', 'em', '%' ),
1753 'selectors' => array(
1754 '{{WRAPPER}} .premium-cf7-container .wpcf7-mail-sent-ng, {{WRAPPER}} .premium-cf7-container .wpcf7-mail-sent-ok, {{WRAPPER}} .premium-cf7-container .wpcf7-response-output' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1755 ),
1756 )
1757 );
1758
1759 $this->add_responsive_control(
1760 'after_submit_padding',
1761 array(
1762 'label' => __( 'Padding', 'premium-addons-for-elementor' ),
1763 'type' => Controls_Manager::DIMENSIONS,
1764 'size_units' => array( 'px', 'em', '%' ),
1765 'selectors' => array(
1766 '{{WRAPPER}} .premium-cf7-container .wpcf7-mail-sent-ng, {{WRAPPER}} .premium-cf7-container .wpcf7-mail-sent-ok, {{WRAPPER}} .premium-cf7-container .wpcf7-response-output' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1767 ),
1768 )
1769 );
1770
1771 $this->end_controls_section();
1772 }
1773
1774 /**
1775 * Get WPCF Forms
1776 *
1777 * @since 1.0.0
1778 * @access public
1779 */
1780 protected function get_wpcf_forms() {
1781
1782 if ( ! class_exists( 'WPCF7_ContactForm' ) ) {
1783 return array();
1784 }
1785
1786 $forms = \WPCF7_ContactForm::find(
1787 array(
1788 'orderby' => 'title',
1789 'order' => 'ASC',
1790 )
1791 );
1792
1793 if ( empty( $forms ) ) {
1794 return array();
1795 }
1796
1797 $result = array();
1798
1799 foreach ( $forms as $item ) {
1800 $key = sprintf( '%1$s::%2$s', $item->id(), $item->title() );
1801 $result[ $key ] = $item->title();
1802 }
1803
1804 return $result;
1805 }
1806
1807 /**
1808 * Render Contact Form 7 widget output on the frontend.
1809 *
1810 * Written in PHP and used to generate the final HTML.
1811 *
1812 * @since 1.0.0
1813 * @access protected
1814 */
1815 protected function render() {
1816
1817 $settings = $this->get_settings();
1818
1819 $papro_activated = Helper_Functions::check_papro_version();
1820
1821 $source = $settings['source'];
1822
1823 if ( ! $papro_activated || version_compare( PREMIUM_PRO_ADDONS_VERSION, '2.9.6', '<' ) ) {
1824
1825 if ( 'presets' === $source || '' !== $settings['fields_effects'] ) {
1826
1827 ?>
1828 <div class="premium-error-notice">
1829 <?php
1830 $message = __( 'This option is available in <b>Premium Addons Pro</b>.', 'premium-addons-for-elementor' );
1831 echo wp_kses_post( $message );
1832 ?>
1833 </div>
1834 <?php
1835 return false;
1836
1837 }
1838 }
1839
1840 $form_id = 'existing' === $source ? $settings['premium_wpcf7_form'] : $settings['form_id'];
1841
1842 if ( ! empty( $form_id ) ) {
1843
1844 $title_tag = Helper_Functions::validate_html_tag( $settings['title_tag'] );
1845
1846 if ( 'yes' === $settings['form_title'] ) {
1847
1848 $this->add_inline_editing_attributes( 'title_text' );
1849 $this->add_render_attribute( 'title_text', 'class', 'premium-cf7-title' );
1850
1851 }
1852
1853 if ( 'yes' === $settings['form_description'] ) {
1854
1855 $this->add_inline_editing_attributes( 'description_text' );
1856 $this->add_render_attribute( 'description_text', 'class', 'premium-cf7-description' );
1857
1858 }
1859
1860 $form_settings = array(
1861 'fields_glass' => $settings['fields_lq_effect'],
1862 'submit_glass' => $settings['submit_lq_effect'],
1863 );
1864
1865 $this->add_render_attribute(
1866 'container',
1867 array(
1868 'class' => 'premium-cf7-container',
1869 'data-settings' => wp_json_encode( $form_settings ),
1870 )
1871 );
1872
1873 ?>
1874
1875 <?php if ( 'yes' === $settings['form_title'] || 'yes' === $settings['form_description'] ) : ?>
1876
1877 <div class="premium-cf-head">
1878
1879 <?php if ( ! empty( $settings['title_text'] ) ) : ?>
1880 <<?php echo wp_kses_post( $title_tag ) . ' ' . wp_kses_post( $this->get_render_attribute_string( 'title_text' ) ); ?>>
1881 <?php echo wp_kses_post( $settings['title_text'] ); ?>
1882 </<?php echo wp_kses_post( $title_tag ); ?>>
1883 <?php endif; ?>
1884
1885 <?php if ( ! empty( $settings['description_text'] ) ) : ?>
1886 <div <?php $this->print_render_attribute_string( 'description_text' ); ?>>
1887 <?php echo wp_kses_post( $settings['description_text'] ); ?>
1888 </div>
1889 <?php endif; ?>
1890
1891 </div>
1892
1893 <?php endif; ?>
1894
1895 <div <?php $this->print_render_attribute_string( 'container' ); ?>>
1896 <?php echo do_shortcode( '[contact-form-7 id="' . $form_id . '" ]' ); ?>
1897 </div>
1898
1899 <?php
1900 }
1901 }
1902 }
1903