start_controls_section( 'section_detail', array( 'label' => esc_html__( 'Section Setting', 'accesspress-parallax' ), ) ); $this->add_control( 'section_layout', array( 'label' => esc_html__( 'Section Layout:', 'accesspress-parallax' ), 'type' => Controls_Manager::SELECT, 'label_block' => true, 'default' => 'layout1', 'options' => array( 'layout1' => esc_html__('Layout 1','accesspress-parallax'), 'layout2' => esc_html__('Layout 2','accesspress-parallax'), ) ) ); $this->add_control( 'section_shortcode', array( 'label' => esc_html__( 'Shortcode:', 'accesspress-parallax' ), 'type' => Controls_Manager::TEXT, 'label_block' => true, ) ); $this->end_controls_section(); //styling tab $this->start_controls_section( 'section_general_style', [ 'label' => esc_html__( 'General Styles', 'accesspress-parallax' ), 'tab' => Controls_Manager::TAB_STYLE, ] ); $this->add_control( 'contact_form_placeholder_color', [ 'label' => esc_html__( 'Form Placeholder Color', 'accesspress-parallax' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} h4.contact-form-shortcode' => 'color: {{VALUE}};', ], ] ); $this->add_control( 'contact_form_button_color', [ 'label' => esc_html__( 'Form Button Text Color', 'accesspress-parallax' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .ap-contact-form-wrapper input[type="submit"]' => 'color: {{VALUE}};', ], ] ); $this->add_control( 'contact_form_button_color_hover', [ 'label' => esc_html__( 'Form Button Text Color: Hover', 'accesspress-parallax' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .ap-contact-form-wrapper input[type="submit"]:hover' => 'color: {{VALUE}};', ], ] ); $this->add_control( 'contact_form_button_bgcolor', [ 'label' => esc_html__( 'Form Button Background Color', 'accesspress-parallax' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .ap-contact-form-wrapper input[type="submit"]' => 'background-color: {{VALUE}};', ], ] ); $this->add_control( 'contact_form_button_bgcolor_hover', [ 'label' => esc_html__( 'Form Button Background Color: Hover', 'accesspress-parallax' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .ap-contact-form-wrapper input[type="submit"]:hover' => 'background-color: {{VALUE}};', ], ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'contact_form_placeholder_typography', 'label' => esc_html__( 'Form Placeholder Typography', 'accesspress-parallax' ), 'scheme' => Scheme_Typography::TYPOGRAPHY_4, 'selector' => '{{WRAPPER}} .ap-contact-form-wrapper input, {{WRAPPER}} .ap-contact-form-wrapper textarea', ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'contact_form_button_typography', 'label' => esc_html__( 'Form Button Typography', 'accesspress-parallax' ), 'scheme' => Scheme_Typography::TYPOGRAPHY_4, 'selector' => '{{WRAPPER}} .ap-contact-form-wrapper input[type="submit"]', ] ); $this->end_controls_section();//end for styling tab } /** * Render Accesspress_Parallax_Contact_Form widget output on the frontend. * * Written in PHP and used to generate the final HTML. * * @access protected */ protected function render() { $settings = $this->get_settings(); $layout = isset( $settings[ 'section_layout' ] )? $settings[ 'section_layout' ] : 'layout1'; $this->add_render_attribute( 'ap-contact-form', 'class', 'ap-contact-form-section ' ); $shortcode = isset( $settings[ 'section_shortcode' ] )? $settings[ 'section_shortcode' ] : ''; ?>