PluginProbe
weForms – Easy Drag & Drop Contact Form Builder For WordPress / 1.4.0
weForms – Easy Drag & Drop Contact Form Builder For WordPress v1.4.0
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-polling-form.php +52 -51 1.6.211.4.0 View file →
@@ -1,51 +1,52 @@
1 -<?php
2 -/**
3 - * A simple contact form for sending message
4 - */
5 -class WeForms_Template_Polling_Form extends WeForms_Form_Template {
6 -
7 - public function __construct() {
8 - parent::__construct();
9 -
10 - $this->enabled = class_exists( 'WeForms_Pro' );
11 - $this->title = __( 'Polling Form', 'weforms' );
12 - $this->description = '';
13 - $this->category = 'default';
14 - $this->image = WEFORMS_ASSET_URI . '/images/form-template/polling_form.png';
15 - $this->category = 'feedback';
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['radio_field']->get_field_props(), [
28 - 'required' => 'yes',
29 - 'label' => 'Poll Question',
30 - 'name' => 'poll_field',
31 - ] ),
32 - ];
33 -
34 - return $form_fields;
35 - }
36 -
37 - /**
38 - * Get the form settings
39 - *
40 - * @return array
41 - */
42 - public function get_form_settings() {
43 - $defaults = $this->get_default_settings();
44 -
45 - return array_merge( $defaults, [
46 - 'message' => __( 'Thanks for taking part in the poll!', 'weforms' ),
47 - 'submit_text' => __( 'Submit', 'weforms' ),
48 - 'label_position' => 'left',
49 - ] );
50 - }
51 -}
1 +<?php
2 +/**
3 + * A simple contact form for sending message
4 + */
5 +class WeForms_Template_Polling_Form extends WeForms_Form_Template {
6 +
7 + public function __construct() {
8 + parent::__construct();
9 +
10 + $this->enabled = class_exists( 'WeForms_Pro' );
11 + $this->title = __( 'Polling Form', 'weforms' );
12 + $this->description = '';
13 + $this->category = 'default';
14 + $this->image = WEFORMS_ASSET_URI . '/images/form-template/polling_form.png';
15 + $this->category = 'feedback';
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 = array(
27 + array_merge( $all_fields['radio_field']->get_field_props(), array(
28 + 'required' => 'yes',
29 + 'label' => 'Poll Question',
30 + 'name' => 'poll_field',
31 + ) ),
32 + );
33 +
34 + return $form_fields;
35 + }
36 +
37 + /**
38 + * Get the form settings
39 + *
40 + * @return array
41 + */
42 + public function get_form_settings() {
43 + $defaults = $this->get_default_settings();
44 +
45 + return array_merge( $defaults, array(
46 + 'message' => __( 'Thanks for taking part in the poll!', 'weforms' ),
47 + 'submit_text' => __( 'Submit', 'weforms' ),
48 + 'label_position' => 'left',
49 + ) );
50 + }
51 +
52 +}