Submit
Path:
~
/
home
/
getwphos
/
www
/
radkingpanels
/
wp-content
/
plugins
/
poolax-core
/
addons
/
widgets
/
File Content:
poolax-contact-form.php
<?php use \Elementor\Widget_Base; use \Elementor\Controls_Manager; use \Elementor\Group_Control_Typography; use \Elementor\Utils; use \Elementor\Group_Control_Image_Size; use \Elementor\Group_Control_Box_Shadow; use \Elementor\Group_Control_Border; use \Elementor\Repeater; /** * * Contact Form Widget . * */ class poolax_Contact_Form extends Widget_Base { public function get_name() { return 'poolaxcontactform'; } public function get_title() { return __( 'Contact Form', 'poolax' ); } public function get_icon() { return 'th-icon'; } public function get_categories() { return [ 'poolax' ]; } public function get_as_contact_form(){ if ( ! class_exists( 'WPCF7' ) ) { return; } $as_cfa = array(); $as_cf_args = array( 'posts_per_page' => -1, 'post_type'=> 'wpcf7_contact_form' ); $as_forms = get_posts( $as_cf_args ); $as_cfa = ['0' => esc_html__( 'Select Form', 'poolax' ) ]; if( $as_forms ){ foreach ( $as_forms as $as_form ){ $as_cfa[$as_form->ID] = $as_form->post_title; } }else{ $as_cfa[ esc_html__( 'No contact form found', 'poolax' ) ] = 0; } return $as_cfa; } protected function register_controls() { $this->start_controls_section( 'contact_form_section', [ 'label' => __( 'Contact Form', 'poolax' ), 'tab' => Controls_Manager::TAB_CONTENT, ] ); $this->add_control( 'layout_style', [ 'label' => __( 'Layout Style', 'poolax' ), 'type' => Controls_Manager::SELECT, 'default' => '1', 'options' => [ '1' => __( 'Style One', 'poolax' ), '2' => __( 'Style Two', 'poolax' ), '3' => __( 'Style Three', 'poolax' ), '4' => __( 'Style Four', 'poolax' ), '5' => __( 'Style Five', 'poolax' ), '6' => __( 'Style Six', 'poolax' ), '7' => __( 'Style Seven', 'poolax' ), ], ] ); poolax_general_fields($this, 'title', 'Title', 'TEXTAREA', 'Book An Appointment'); $this->add_control( 'poolax_select_contact_form', [ 'label' => esc_html__( 'Select Form', 'poolax' ), 'type' => Controls_Manager::SELECT, 'default' => '0', 'options' => $this->get_as_contact_form(), ] ); poolax_media_fields( $this, 'image', 'Choose Image', ['7'] ); poolax_general_fields( $this, 'subtitle', 'Subtitle', 'TEXT', 'Who We Are', ['7'] ); poolax_general_fields( $this, 'title2', 'Title', 'TEXTAREA', 'Elevating Indoor Pool Experiences', ['7'] ); poolax_general_fields( $this, 'desc', 'Description', 'TEXTAREA', '', ['7'] ); poolax_general_fields( $this, 'button_text', 'Button Text', 'TEXT', 'Discover More', ['7'] ); poolax_url_fields( $this, 'button_url', 'Button URL', '#', ['7'] ); poolax_general_fields( $this, 'desc2', 'Content', 'TEXTAREA', '', ['7'] ); $this->end_controls_section(); //--------------------------------------- //Style Section Start //--------------------------------------- $this->start_controls_section( 'general_styling', [ 'label' => __( 'Background Styling', 'poolax' ), 'tab' => Controls_Manager::TAB_STYLE, 'condition' => [ 'layout_style' => ['7'] ], ] ); poolax_color_fields( $this, 'bg', 'Background', 'background', '{{WRAPPER}} .why-area3' ); poolax_color_fields( $this, 'bg2', 'Background', 'background', '{{WRAPPER}} .bg' ); $this->end_controls_section(); //-------Title Style------- poolax_common_style_fields($this, 'title', 'Form Title', '{{WRAPPER}} .th-title'); //------Button Style------- poolax_button_style_fields($this, '10', 'Form Button Styling', '{{WRAPPER}} .th-btn'); poolax_common_style_fields($this, 'subtitle22', 'Subtitle', '{{WRAPPER}} .sub-title', ['7'], '--theme-color'); poolax_common_style_fields($this, 'title22', 'Title', '{{WRAPPER}} .sec-title', ['7'] ); poolax_common_style_fields($this, 'desc22', 'Description', '{{WRAPPER}} .desc', ['7'] ); poolax_button_style_fields($this, '12', 'Button Styling', '{{WRAPPER}} .th_btn', ['7']); } protected function render() { $settings = $this->get_settings_for_display(); if( $settings['layout_style'] == '2' ){ echo '<div class="appointment-form style2">'; if(!empty($settings['title'])){ echo '<h3 class="form-title th-title text-center">'.esc_html($settings['title']).'</h3>'; } if( !empty($settings['poolax_select_contact_form']) ){ echo do_shortcode( '[contact-form-7 id="'.$settings['poolax_select_contact_form'].'"]' ); }else{ echo '<div class="alert alert-warning"><p class="m-0">' . __('Please Select contact form.', 'poolax' ). '</p></div>'; } echo '</div>'; }elseif( $settings['layout_style'] == '3' ){ echo '<div class="booking-form ajax-contact wow fadeInUp">'; echo '<div class="input-wrap">'; if(!empty($settings['title'])){ echo '<h3 class="sec-title th-title mb-10">'.esc_html($settings['title']).'</h3>'; } if( !empty($settings['poolax_select_contact_form']) ){ echo do_shortcode( '[contact-form-7 id="'.$settings['poolax_select_contact_form'].'"]' ); }else{ echo '<div class="alert alert-warning"><p class="m-0">' . __('Please Select contact form.', 'poolax' ). '</p></div>'; } echo '</div>'; echo '</div>'; }elseif( $settings['layout_style'] == '4' ){ echo '<div class="contact-form-wrapper">'; echo '<div class="contact-form ajax-contact">'; if(!empty($settings['title'])){ echo '<h3 class="form-title text-center th-title">'.esc_html($settings['title']).'</h3>'; } if( !empty($settings['poolax_select_contact_form']) ){ echo do_shortcode( '[contact-form-7 id="'.$settings['poolax_select_contact_form'].'"]' ); }else{ echo '<div class="alert alert-warning"><p class="m-0">' . __('Please Select contact form.', 'poolax' ). '</p></div>'; } echo '</div>'; echo '</div>'; }elseif( $settings['layout_style'] == '5' ){ echo '<div class="contact-form ajax-contact">'; if(!empty($settings['title'])){ echo '<div class="title-area text-center">'; echo '<h3 class="sec-title th-title">'.esc_html($settings['title']).'</h3>'; echo '</div>'; } if( !empty($settings['poolax_select_contact_form']) ){ echo do_shortcode( '[contact-form-7 id="'.$settings['poolax_select_contact_form'].'"]' ); }else{ echo '<div class="alert alert-warning"><p class="m-0">' . __('Please Select contact form.', 'poolax' ). '</p></div>'; } echo '</div>'; }elseif( $settings['layout_style'] == '6' ){ echo '<div class="widget widget_categories ">'; if(!empty($settings['title'])){ echo '<h3 class="widget_title th-title">'.esc_html($settings['title']).'</h3>'; } echo '<div class="question-form">'; if( !empty($settings['poolax_select_contact_form']) ){ echo do_shortcode( '[contact-form-7 id="'.$settings['poolax_select_contact_form'].'"]' ); }else{ echo '<div class="alert alert-warning"><p class="m-0">' . __('Please Select contact form.', 'poolax' ). '</p></div>'; } echo '</div>'; echo '</div>'; }elseif( $settings['layout_style'] == '7' ){ echo '<div class="why-area3">'; echo '<div class="container">'; echo '<div class="row align-items-center">'; echo '<div class="col-xl-6 wow fadeInLeft">'; echo '<div class="appointment-form style3 bg">'; if(!empty($settings['title'])){ echo '<h4 class="form-title text-center mb-30 th-title">'.esc_html($settings['title']).'</h4>'; } if( !empty($settings['poolax_select_contact_form']) ){ echo do_shortcode( '[contact-form-7 id="'.$settings['poolax_select_contact_form'].'"]' ); }else{ echo '<div class="alert alert-warning"><p class="m-0">' . __('Please Select contact form.', 'poolax' ). '</p></div>'; } echo '</div>'; echo '</div>'; echo '<div class="col-xl-6 wow fadeInRight">'; echo '<div class="ps-xl-5 ms-xl-4 mb-20 mb-xl-0 pb-60 pb-xl-0">'; echo '<div class="title-area text-center text-xl-start mb-25">'; if(!empty($settings['subtitle'])){ echo '<span class="sub-title style1">'.wp_kses_post($settings['subtitle']).'</span>'; } if(!empty($settings['title2'])){ echo '<h2 class="sec-title">'.wp_kses_post($settings['title2']).'</h2>'; } if(!empty($settings['desc'])){ echo '<p class="mb-30 desc">'.wp_kses_post($settings['desc']).'</p>'; } echo '</div>'; echo '<div class="btn-group justify-content-center justify-content-xl-start">'; if(!empty($settings['button_text'])){ echo '<a href="'.esc_url( $settings['button_url']['url'] ).'" class="th-btn th_btn">'.wp_kses_post($settings['button_text']).'</a>'; } if(!empty($settings['desc2'])){ echo '<div class="feature-wrapper style3">'; echo wp_kses_post($settings['desc2']); echo '</div>'; } echo '</div>'; echo '</div>'; echo '</div>'; echo '</div>'; echo '</div>'; if(!empty( $settings['image']['url'])){ echo '<div class="why-image3">'; echo poolax_img_tag( array( 'url' => esc_url( $settings['image']['url'] ), )); echo '</div>'; } echo '</div>'; }else{ echo '<div class="appointment-content wow fadeInUp">'; echo '<div class="appointment-form ms-xl-5">'; if(!empty($settings['title'])){ echo '<div class="title-area mb-25 text-center">'; echo '<h4 class="sec-title th-title">'.esc_html($settings['title']).'</h4>'; echo '</div>'; } if( !empty($settings['poolax_select_contact_form']) ){ echo do_shortcode( '[contact-form-7 id="'.$settings['poolax_select_contact_form'].'"]' ); }else{ echo '<div class="alert alert-warning"><p class="m-0">' . __('Please Select contact form.', 'poolax' ). '</p></div>'; } echo '</div>'; echo '</div>'; } } }
Submit
FILE
FOLDER
Name
Size
Permission
Action
poolax-about-us.php
11054 bytes
0644
poolax-animated-shape.php
5700 bytes
0644
poolax-arrows.php
2016 bytes
0644
poolax-banner.php
24342 bytes
0644
poolax-banner2.php
11984 bytes
0644
poolax-blog.php
29013 bytes
0644
poolax-brand-logo.php
4578 bytes
0644
poolax-button.php
5216 bytes
0644
poolax-choose-us.php
11970 bytes
0644
poolax-choose.php
14048 bytes
0644
poolax-classes.php
6523 bytes
0644
poolax-contact-form.php
10525 bytes
0644
poolax-contact-info.php
13756 bytes
0644
poolax-counterup.php
10646 bytes
0644
poolax-cta.php
6743 bytes
0644
poolax-download-button.php
2675 bytes
0644
poolax-faq.php
9485 bytes
0644
poolax-features.php
18133 bytes
0644
poolax-footer-widgets.php
2660 bytes
0644
poolax-gallery-filter.php
4974 bytes
0644
poolax-gallery.php
12033 bytes
0644
poolax-image.php
11605 bytes
0644
poolax-info-box.php
11747 bytes
0644
poolax-marquee.php
4578 bytes
0644
poolax-menu-select.php
4451 bytes
0644
poolax-newsletter.php
13804 bytes
0644
poolax-offer.php
3931 bytes
0644
poolax-portfolio-info.php
6899 bytes
0644
poolax-portfolio.php
11562 bytes
0644
poolax-price.php
4725 bytes
0644
poolax-section-title.php
6036 bytes
0644
poolax-service-list.php
2526 bytes
0644
poolax-service.php
19858 bytes
0644
poolax-skill.php
4691 bytes
0644
poolax-social.php
2730 bytes
0644
poolax-step.php
11915 bytes
0644
poolax-tab-builder.php
3744 bytes
0644
poolax-team-info.php
3873 bytes
0644
poolax-team.php
31875 bytes
0644
poolax-testimonial.php
38256 bytes
0644
poolax-video.php
3149 bytes
0644
N4ST4R_ID | Naxtarrr