| 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 |
|