PluginProbe
weForms – Easy Drag & Drop Contact Form Builder For WordPress / 1.1.1
weForms – Easy Drag & Drop Contact Form Builder For WordPress v1.1.1
1.6.7 1.6.8 1.6.9 1.6.12 1.6.13 1.6.14 1.6.15 1.6.16 1.6.17 1.6.18 1.6.19 1.6.2 1.6.20 1.6.21 1.6.22 1.6.23 1.6.24 1.6.25 1.6.26 1.6.27 1.6.28 1.6.3 1.6.4 1.6.5 1.6.6 All 74 releases
← All changes | includes/templates/class-template-contact.php +44 -44 1.6.261.1.1 View file →
@@ -1,44 +1,44 @@
1 -<?php
2 -
3 -/**
4 - * Contact form template
5 - */
6 -class WeForms_Template_Contact extends WeForms_Form_Template {
7 -
8 - public function __construct() {
9 - parent::__construct();
10 -
11 - $this->enabled = true;
12 - $this->title = __( 'Contact Form', 'weforms' );
13 - $this->description = __( 'Create a simple contact form for your site.', 'weforms' );
14 - $this->image = WEFORMS_ASSET_URI . '/images/form-template/contact.png';
15 - $this->category = 'default';
16 - }
17 -
18 - /**
19 - * Get the form fields
20 - *
21 - * @return array
22 - */
23 - public function get_form_fields() {
24 - $all_fields = $this->get_available_fields();
25 -
26 - $form_fields = [
27 - array_merge( $all_fields['name_field']->get_field_props(), [
28 - 'required' => 'yes',
29 - 'name' => 'name',
30 - ] ),
31 - array_merge( $all_fields['email_address']->get_field_props(), [
32 - 'required' => 'yes',
33 - 'name' => 'email',
34 - ] ),
35 - array_merge( $all_fields['textarea_field']->get_field_props(), [
36 - 'required' => 'yes',
37 - 'label' => __( 'Message', 'weforms' ),
38 - 'name' => 'message',
39 - ] ),
40 - ];
41 -
42 - return $form_fields;
43 - }
44 -}
1 +<?php
2 +
3 +/**
4 + * Contact form template
5 + */
6 +class WeForms_Template_Contact extends WeForms_Form_Template {
7 +
8 + public function __construct() {
9 + parent::__construct();
10 +
11 + $this->enabled = true;
12 + $this->title = __( 'Contact Form', 'weforms' );
13 + $this->description = __( 'Create a simple contact form for your site.', 'weforms' );
14 + $this->image = WEFORMS_ASSET_URI . '/images/form-template/contact.png';
15 + }
16 +
17 + /**
18 + * Get the form fields
19 + *
20 + * @return array
21 + */
22 + public function get_form_fields() {
23 + $all_fields = $this->get_available_fields();
24 +
25 + $form_fields = array(
26 + array_merge( $all_fields['name_field']->get_field_props(), array(
27 + 'required' => 'yes',
28 + 'name' => 'name'
29 + ) ),
30 + array_merge( $all_fields['email_address']->get_field_props(), array(
31 + 'required' => 'yes',
32 + 'name' => 'email'
33 + ) ),
34 + array_merge( $all_fields['textarea_field']->get_field_props(), array(
35 + 'required' => 'yes',
36 + 'label' => __( 'Message', 'weforms' ),
37 + 'name' => 'message',
38 + ) ),
39 + );
40 +
41 + return $form_fields;
42 + }
43 +
44 +}