# borderless/1.2.1/modules/elementor/widgets/contact-form-7.php

Borderless – Addons and Templates for Elementor, version 1.2.1. 72 lines.

- Page: https://pluginprobe.com/plugins/borderless/1.2.1/code/modules/elementor/widgets/contact-form-7.php
- Raw: https://pluginprobe.com/plugins/borderless/1.2.1/raw/modules/elementor/widgets/contact-form-7.php
- Modified: 2021-07-29T21:31:02+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/borderless/1.2.1/code/modules/elementor/widgets/contact-form-7.php#L10-L20`.

```php
<?php

namespace Borderless\Widgets;

if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly

use Elementor\Widget_Base;
use Elementor\Controls_Manager;
use Elementor\Group_Control_Image_Size;
use Elementor\Utils;

class Contact_Form_7 extends Widget_Base {
	
	public function get_name() {
		return 'contact-form-7';
	}
	
	public function get_title() {
		return 'Contact From 7';
	}
	
	public function get_icon() {
		return 'fa fa-envelope-o';
	}
	
	public function get_categories() {
		return [ 'borderless' ];
	}
	
	protected function _register_controls() {

		$this->start_controls_section(
			'section_content',
			[
				'label' => esc_html__( 'Contact Form 7', 'borderless' ),
				'tab' => Controls_Manager::TAB_CONTENT,
			]
		);

		$this->add_control(
			'contact_form_7',
			[
				'label' => esc_html__( 'Select Contact Form', 'borderless' ),
                'description' => esc_html__('Contact form 7 - plugin must be installed and there must be some contact forms made with the contact form 7','borderless'),
				'type' => Controls_Manager::SELECT2,
				'multiple' => false,
				'label_block' => 1,
				'options' => get_contact_form_7_posts(),
			]
		);

		$this->end_controls_section();
	}
	
	protected function render() {

		$settings = $this->get_settings();

        if(!empty($settings['contact_form_7'])){
    	   echo'<div class="borderless-elementor-contact-form-7" contact-form-7-id="'. $settings['contact_form_7'] .'">';
                echo do_shortcode('[contact-form-7 id="'.$settings['contact_form_7'].'"]');    
           echo '</div>';  
    	}		 

	}
	
	protected function _content_template() {

    }
	
	
}
```
