PluginProbe
weForms – Easy Drag & Drop Contact Form Builder For WordPress / 1.3.3
weForms – Easy Drag & Drop Contact Form Builder For WordPress v1.3.3
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-admission-form.php

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

144 lines 5.0 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_Admission_Form extends WeForms_Form_Template {
7
8 public function __construct() {
9 parent::__construct();
10
11 $this->enabled = class_exists( 'WeForms_Pro' );
12 $this->title = __( 'Admissions Form', 'weforms' );
13 $this->description = __( 'A sample admissions and registration form for your educational institution on this multi-page admissions form to ask for user details and an application fee.', 'weforms' );
14 $this->image = WEFORMS_ASSET_URI . '/images/form-template/admission_form.png';
15 $this->category = 'registration';
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
28 array_merge( $all_fields['name_field']->get_field_props(), array(
29 'required' => 'yes',
30 'format' => 'first-middle-last',
31
32 'first_name' => array(
33 'placeholder' => '',
34 'default' => '',
35 'sub' => __( 'First', 'weforms' )
36 ),
37
38 'middle_name' => array(
39 'placeholder' => '',
40 'default' => '',
41 'sub' => __( 'Middle', 'weforms' )
42 ),
43 'last_name' => array(
44 'placeholder' => '',
45 'default' => '',
46 'sub' => __( 'Last', 'weforms' )
47 ),
48 'hide_subs' => false,
49 'name' => 'format',
50 ) ),
51
52 array_merge( $all_fields['date_field']->get_field_props(), array(
53 'required' => 'yes',
54 'label' => __( 'Birth Date', 'weforms' ),
55 'name' => 'birth_date',
56 ) ),
57
58 array_merge( $all_fields['radio_field']->get_field_props(), array(
59 'required' => 'yes',
60 'label' => __( 'Gender', 'weforms' ),
61 'name' => 'gender',
62 'options' => array(
63 'male' => 'Male',
64 'female' => 'Female',
65 'decline_to_answer' => 'Decline to Answer'
66 ),
67 ) ),
68
69 array_merge( $all_fields['radio_field']->get_field_props(), array(
70 'required' => 'yes',
71 'label' => __( 'Are you Hispanic or Latino?', 'weforms' ),
72 'name' => 'latino',
73 'options' => array(
74 'yes' => 'Yes',
75 'no' => 'No',
76 'decline_to_answer' => 'Decline to Answer'
77 ),
78 ) ),
79
80 array_merge( $all_fields['checkbox_field']->get_field_props(), array(
81 'required' => 'yes',
82 'label' => __( 'Race:', 'weforms' ),
83 'name' => 'race',
84 'options' => array(
85 'american' => 'American Indian/Alaskan Native ',
86 'asian' => 'Asian',
87 'black' => 'Black',
88 'native_hawaiian' => 'Native Hawaiian/Other Pacific Islander',
89 'white' => 'White',
90 'decline_to_answer' => 'Decline to Answer',
91 ),
92 ) ),
93
94 array_merge( $all_fields['numeric_text_field']->get_field_props(), array(
95 'required' => 'yes',
96 'label' => __( 'Phone Number', 'weforms' ),
97 'name' => 'phone_number',
98 ) ),
99
100 array_merge( $all_fields['email_address']->get_field_props(), array(
101 'required' => 'yes',
102 'label' => __( 'Email Address', 'weforms' ),
103 'name' => 'email_address',
104 ) ),
105
106
107 array_merge( $all_fields['address_field']->get_field_props(), array(
108 'required' => 'yes',
109 'label' => __( 'Mailing Address', 'weforms' ),
110 'name' => 'mailing_address',
111 ) ),
112
113 array_merge( $all_fields['checkbox_field']->get_field_props(), array(
114 'required' => 'yes',
115 'label' => __( 'Payment Method', 'weforms' ),
116 'name' => 'payment_method',
117 'options' => array(
118 'credit_card' => 'Credit Card',
119 'mail_a_check' => 'Mail a Check',
120 'in_person' => 'In Person at School',
121 ),
122 ) ),
123 );
124
125 return $form_fields;
126 }
127
128
129
130 /**
131 * Get the form settings
132 *
133 * @return array
134 */
135 public function get_form_settings() {
136 $defaults = $this->get_default_settings();
137
138 return array_merge( $defaults, array(
139 'submit_text' => __( 'Submit', 'weforms' ),
140 ) );
141 }
142
143 }
144