PluginProbe
weForms – Easy Drag & Drop Contact Form Builder For WordPress / 1.2.8
weForms – Easy Drag & Drop Contact Form Builder For WordPress v1.2.8
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.2.8, at includes/templates/class-template-request-for-quote.php

132 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
25 $all_fields = $this->get_available_fields();
26
27 $form_fields = array(
28
29 array_merge($all_fields['name_field']->get_field_props(), array(
30 'required' => 'yes',
31 'label' => __('Name', 'weforms'),
32 'format' => 'first-last',
33 'name' => 'format',
34 )),
35
36 array_merge($all_fields['numeric_text_field']->get_field_props(), array(
37 'required' => 'yes',
38 'label' => __('Phone Number', 'weforms'),
39 'name' => 'phone_number',
40 )),
41
42 array_merge($all_fields['email_address']->get_field_props(), array(
43 'required' => 'yes',
44 'label' => __('Email Address', 'weforms'),
45 'name' => 'email_address',
46 )),
47
48 array_merge($all_fields['radio_field']->get_field_props(), array(
49 'required' => 'yes',
50 'label' => __('Preferred Method of Contact', 'weforms'),
51 'name' => 'preferred_method',
52 'options' => array(
53 'prefer_phone' => 'Phone',
54 'prefer_email' => 'Email',
55 'prefer_either' => 'Either',
56 ),
57 )),
58
59
60 array_merge($all_fields['radio_field']->get_field_props(), array(
61 'required' => 'yes',
62 'label' => __('Preferred Type of Trip', 'weforms'),
63 'name' => 'preferred_trip',
64 'options' => array(
65 'one_way' => 'One Way',
66 'round_trip' => 'Round Trip',
67 'hourly' => 'Hourly',
68 ),
69 )),
70
71
72 array_merge($all_fields['address_field']->get_field_props(), array(
73 'required' => 'yes',
74 'label' => __('Pickup Address ', 'weforms'),
75 'name' => 'pickup_address',
76 )),
77
78 array_merge($all_fields['dropdown_field']->get_field_props(), array(
79 'required' => 'yes',
80 'label' => __('Number of Passengers', 'weforms'),
81 'name' => 'number_of_passengers',
82 'options' => array(
83 '1' => '1',
84 '2' => '2',
85 '3' => '3',
86 '4' => '4',
87 '5' => '5',
88 '6' => '6',
89 '7' => '7',
90 '8' => '8',
91 '9' => '9',
92 '10' => '10',
93 '11' => '11',
94 '12' => '12',
95 '13' => '13',
96 '14' => '14',
97 ),
98 )),
99
100 array_merge($all_fields['dropdown_field']->get_field_props(), array(
101 'required' => 'yes',
102 'label' => __('Number of Hours ', 'weforms'),
103 'name' => 'number_of_hours ',
104 'options' => array(
105 '1' => '1',
106 '2' => '2',
107 '3' => '3',
108 '4' => '4',
109 '5' => '5',
110 '6' => '6',
111 '7' => '7',
112 '8' => '8',
113 '9' => '9',
114 '10' => '10',
115 '11' => '11',
116 '12' => '12',
117 '13' => '13',
118 '14' => '14',
119 ),
120 )),
121
122 array_merge($all_fields['textarea_field']->get_field_props(), array(
123 'label' => __('Comments/Special Requests', 'weforms'),
124 'name' => 'comments_request'
125 )),
126 );
127
128 return $form_fields;
129 }
130
131 }
132