PluginProbe
weForms – Easy Drag & Drop Contact Form Builder For WordPress / 1.6.28
weForms – Easy Drag & Drop Contact Form Builder For WordPress v1.6.28
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-volunteer-application.php

class-template-volunteer-application.php in weForms – Easy Drag & Drop Contact Form Builder For WordPress 1.6.28, at includes/templates/class-template-volunteer-application.php

94 lines 3.6 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_Volunteer_Application extends WeForms_Form_Template {
7
8 public function __construct() {
9 parent::__construct();
10
11 $this->enabled = true;
12 $this->title = __( 'Volunteer Application Form', 'weforms' );
13 $this->description = __( 'Get volunteer applications easily and find out which days your volunteers want to work according to their particular interests.', 'weforms' );
14 $this->image = WEFORMS_ASSET_URI . '/images/form-template/volunteer-application.png';
15 $this->category = 'application';
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 $form_fields = [
26 array_merge( $all_fields['section_break']->get_field_props(), [
27 'label' => __( 'Volunteer Application', 'weforms' ),
28 'description' => ' ',
29 ] ),
30
31 array_merge( $all_fields['name_field']->get_field_props(), [
32 'required' => 'yes',
33 'format' => 'first-last',
34 'first_name' => [
35 'placeholder' => '',
36 'default' => '',
37 'sub' => __( 'First Name', 'weforms' ),
38 ],
39 'last_name' => [
40 'placeholder' => '',
41 'default' => '',
42 'sub' => __( 'Last Name', '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', 'weforms' ),
51 'name' => 'email_address',
52 ] ),
53
54 array_merge( $all_fields['numeric_text_field']->get_field_props(), [
55 'required' => 'yes',
56 'label' => __( 'Phone Number', 'weforms' ),
57 'name' => 'phone_number',
58 ] ),
59
60 array_merge( $all_fields['address_field']->get_field_props(), [
61 'required' => 'yes',
62 'label' => __( 'Address', 'weforms' ),
63 'name' => 'address',
64 ] ),
65
66 array_merge( $all_fields['textarea_field']->get_field_props(), [
67 'label' => __( 'Skillsets or Area of Interests', 'weforms' ),
68 'name' => 'area_of_interests',
69 ] ),
70
71 array_merge( $all_fields['checkbox_field']->get_field_props(), [
72 'label' => __( 'Days of Work', 'weforms' ),
73 'name' => 'days_of_work',
74 'options' => [
75 'monday' => __( 'Monday', 'weforms' ),
76 'tuesday' => __( 'Tuesday', 'weforms' ),
77 'wednesday' => __( 'Wednesday', 'weforms' ),
78 'thursday' => __( 'Thursday', 'weforms' ),
79 'friday' => __( 'Friday', 'weforms' ),
80 'sunday' => __( 'Sunday', 'weforms' ),
81 'satarday' => __( 'Satarday', 'weforms' ),
82 ],
83 ] ),
84
85 array_merge( $all_fields['textarea_field']->get_field_props(), [
86 'label' => __( 'Comments', 'weforms' ),
87 'name' => 'comment',
88 ] ),
89 ];
90
91 return $form_fields;
92 }
93 }
94