PluginProbe
weForms – Easy Drag & Drop Contact Form Builder For WordPress / 1.5.4
weForms – Easy Drag & Drop Contact Form Builder For WordPress v1.5.4
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-request-for-quote.php

class-template-request-for-quote.php in weForms – Easy Drag & Drop Contact Form Builder For WordPress 1.5.4, at includes/templates/class-template-request-for-quote.php

127 lines 4.7 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_Request_For_Quote extends WeForms_Form_Template {
7
8 public function __construct() {
9 parent::__construct();
10
11 $this->enabled = class_exists( 'WeForms_Pro' );
12 $this->title = __( 'Request for Quote', 'weforms' );
13 $this->description = __( 'This form will make your customers request for quote easier.', 'weforms' );
14 $this->image = WEFORMS_ASSET_URI . '/images/form-template/qoute_request.png';
15 $this->category = 'request';
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 'label' => __( 'Name', 'weforms' ),
30 'format' => 'first-last',
31 'name' => 'format',
32 ] ),
33
34 array_merge( $all_fields['numeric_text_field']->get_field_props(), [
35 'required' => 'yes',
36 'label' => __( 'Phone Number', 'weforms' ),
37 'name' => 'phone_number',
38 ] ),
39
40 array_merge( $all_fields['email_address']->get_field_props(), [
41 'required' => 'yes',
42 'label' => __( 'Email Address', 'weforms' ),
43 'name' => 'email_address',
44 ] ),
45
46 array_merge( $all_fields['radio_field']->get_field_props(), [
47 'required' => 'yes',
48 'label' => __( 'Preferred Method of Contact', 'weforms' ),
49 'name' => 'preferred_method',
50 'options' => [
51 'prefer_phone' => 'Phone',
52 'prefer_email' => 'Email',
53 'prefer_either' => 'Either',
54 ],
55 ] ),
56
57 array_merge( $all_fields['radio_field']->get_field_props(), [
58 'required' => 'yes',
59 'label' => __( 'Preferred Type of Trip', 'weforms' ),
60 'name' => 'preferred_trip',
61 'options' => [
62 'one_way' => 'One Way',
63 'round_trip' => 'Round Trip',
64 'hourly' => 'Hourly',
65 ],
66 ] ),
67
68 array_merge( $all_fields['address_field']->get_field_props(), [
69 'required' => 'yes',
70 'label' => __( 'Pickup Address ', 'weforms' ),
71 'name' => 'pickup_address',
72 ] ),
73
74 array_merge( $all_fields['dropdown_field']->get_field_props(), [
75 'required' => 'yes',
76 'label' => __( 'Number of Passengers', 'weforms' ),
77 'name' => 'number_of_passengers',
78 'options' => [
79 '1' => '1',
80 '2' => '2',
81 '3' => '3',
82 '4' => '4',
83 '5' => '5',
84 '6' => '6',
85 '7' => '7',
86 '8' => '8',
87 '9' => '9',
88 '10' => '10',
89 '11' => '11',
90 '12' => '12',
91 '13' => '13',
92 '14' => '14',
93 ],
94 ] ),
95
96 array_merge( $all_fields['dropdown_field']->get_field_props(), [
97 'required' => 'yes',
98 'label' => __( 'Number of Hours ', 'weforms' ),
99 'name' => 'number_of_hours ',
100 'options' => [
101 '1' => '1',
102 '2' => '2',
103 '3' => '3',
104 '4' => '4',
105 '5' => '5',
106 '6' => '6',
107 '7' => '7',
108 '8' => '8',
109 '9' => '9',
110 '10' => '10',
111 '11' => '11',
112 '12' => '12',
113 '13' => '13',
114 '14' => '14',
115 ],
116 ] ),
117
118 array_merge( $all_fields['textarea_field']->get_field_props(), [
119 'label' => __( 'Comments/Special Requests', 'weforms' ),
120 'name' => 'comments_request',
121 ] ),
122 ];
123
124 return $form_fields;
125 }
126 }
127