PluginProbe
weForms – Easy Drag & Drop Contact Form Builder For WordPress / 1.6.7
weForms – Easy Drag & Drop Contact Form Builder For WordPress v1.6.7
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
weforms / includes / templates / class-template-website-feedback-form.php

class-template-website-feedback-form.php in weForms – Easy Drag & Drop Contact Form Builder For WordPress 1.6.7, at includes/templates/class-template-website-feedback-form.php

102 lines 4.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 /**
4 * Blank form template
5 */
6 class WeForms_Template_Website_Feedback extends WeForms_Form_Template {
7
8 public function __construct() {
9 parent::__construct();
10
11 $this->enabled = class_exists( 'WeForms_Pro' );
12 $this->title = __( 'Website Feedback', 'weforms' );
13 $this->description = __( 'If you have, own, or manage a website then this is a form that is definitely for you. This form allows users and visitors of your website to rate and give feedback including comments about your website which can help you to improve it!', 'weforms' );
14 $this->image = WEFORMS_ASSET_URI . '/images/form-template/website-feedback.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 $get_form_fields = [
27 array_merge( $all_fields['custom_html']->get_field_props(), [
28 'html' => sprintf( '<h3>%s</h3>', __( 'Website Feedback', 'weforms' ) ),
29 ] ),
30 array_merge( $all_fields['name_field']->get_field_props(), [
31 'required' => 'yes',
32 'label' => 'Full Name',
33 'format' => 'first-last',
34 'first_name' => [
35 'placeholder' => '',
36 'default' => '',
37 'sub' => __( 'First', 'weforms' ),
38 ],
39 'last_name' => [
40 'placeholder' => '',
41 'default' => '',
42 'sub' => __( 'Last', 'weforms' ),
43 ],
44 'hide_subs' => false,
45 'name' => 'format',
46 ] ),
47
48 array_merge( $all_fields['email_address']->get_field_props(), [
49 'required' => 'yes',
50 'label' => 'Email Address',
51 'name' => 'email_address',
52 ] ),
53
54 array_merge( $all_fields['ratings']->get_field_props(), [
55 'required' => 'yes',
56 'label' => __( 'User Friendliness', 'weforms' ),
57 'name' => 'user_friendliness',
58 'options' => [
59 '1' => __( '1', 'weforms' ),
60 '2' => __( '2', 'weforms' ),
61 '3' => __( '3', 'weforms' ),
62 '4' => __( '4', 'weforms' ),
63 '5' => __( '5', 'weforms' ),
64 ],
65 ] ),
66
67 array_merge( $all_fields['ratings']->get_field_props(), [
68 'required' => 'yes',
69 'label' => __( 'Visual Appeal', 'weforms' ),
70 'name' => 'visual_appeal',
71 'options' => [
72 '1' => __( '1', 'weforms' ),
73 '2' => __( '2', 'weforms' ),
74 '3' => __( '3', 'weforms' ),
75 '4' => __( '4', 'weforms' ),
76 '5' => __( '5', 'weforms' ),
77 ],
78 ] ),
79
80 array_merge( $all_fields['ratings']->get_field_props(), [
81 'label' => __( 'Correct Info', 'weforms' ),
82 'name' => 'correct_info',
83 'options' => [
84 '1' => __( '1', 'weforms' ),
85 '2' => __( '2', 'weforms' ),
86 '3' => __( '3', 'weforms' ),
87 '4' => __( '4', 'weforms' ),
88 '5' => __( '5', 'weforms' ),
89 ],
90 ] ),
91
92 array_merge( $all_fields['textarea_field']->get_field_props(), [
93 'required' => 'yes',
94 'label' => __( 'Suggestion, Comments, Or Other Things You Like or Don\'t Like', 'weforms' ),
95 'name' => 'suggestion_comment',
96 ] ),
97 ];
98
99 return $get_form_fields;
100 }
101 }
102