| 1 |
<?php |
| 2 |
/** |
| 3 |
* Blank form template |
| 4 |
*/ |
| 5 |
class Weforms_Template_Conference_Proposal extends WeForms_Form_Template { |
| 6 |
|
| 7 |
public function __construct() { |
| 8 |
parent::__construct(); |
| 9 |
|
| 10 |
$this->enabled = true; |
| 11 |
$this->title = __( 'Conference Proposal', 'weforms' ); |
| 12 |
$this->description = __( 'A winning conference in any industry demands the highest quality candidates and presentations.', 'weforms' ); |
| 13 |
$this->image = WEFORMS_ASSET_URI . '/images/form-template/conference-proposal.png'; |
| 14 |
$this->category = 'request'; |
| 15 |
} |
| 16 |
|
| 17 |
/** |
| 18 |
* Get the form fields |
| 19 |
* |
| 20 |
* @return array |
| 21 |
*/ |
| 22 |
public function get_form_fields() { |
| 23 |
$all_fields = $this->get_available_fields(); |
| 24 |
|
| 25 |
$form_fields = [ |
| 26 |
array_merge( $all_fields['name_field']->get_field_props(), [ |
| 27 |
'required' => 'yes', |
| 28 |
'label' => 'Name', |
| 29 |
'format' => 'first-last', |
| 30 |
'first_name' => [ |
| 31 |
'placeholder' => '', |
| 32 |
'default' => '', |
| 33 |
'sub' => __( 'First Name', 'weforms' ), |
| 34 |
], |
| 35 |
'last_name' => [ |
| 36 |
'placeholder' => '', |
| 37 |
'default' => '', |
| 38 |
'sub' => __( 'Last Name', 'weforms' ), |
| 39 |
], |
| 40 |
'hide_subs' => false, |
| 41 |
'name' => 'format', |
| 42 |
] ), |
| 43 |
array_merge( $all_fields['text_field']->get_field_props(), [ |
| 44 |
'label' => __( 'Job Title', 'weforms' ), |
| 45 |
'name' => 'job_title', |
| 46 |
] ), |
| 47 |
array_merge( $all_fields['text_field']->get_field_props(), [ |
| 48 |
'label' => __( 'Company Name', 'weforms' ), |
| 49 |
'name' => 'company_name', |
| 50 |
] ), |
| 51 |
array_merge( $all_fields['textarea_field']->get_field_props(), [ |
| 52 |
'label' => __( 'Biography', 'weforms' ), |
| 53 |
'name' => 'biography', |
| 54 |
] ), |
| 55 |
array_merge( $all_fields['email_address']->get_field_props(), [ |
| 56 |
'required' => 'yes', |
| 57 |
'label' => __( 'Email Address', 'weforms' ), |
| 58 |
'name' => 'email_address', |
| 59 |
] ), |
| 60 |
array_merge( $all_fields['numeric_text_field']->get_field_props(), [ |
| 61 |
'label' => __( 'Phone Number', 'weforms' ), |
| 62 |
'name' => 'phone_number', |
| 63 |
] ), |
| 64 |
array_merge( $all_fields['text_field']->get_field_props(), [ |
| 65 |
'label' => __( 'Proposal Title', 'weforms' ), |
| 66 |
'name' => 'proposals_title', |
| 67 |
] ), |
| 68 |
array_merge( $all_fields['textarea_field']->get_field_props(), [ |
| 69 |
'label' => __( 'Short Description', 'weforms' ), |
| 70 |
'name' => 'short_description', |
| 71 |
] ), |
| 72 |
array_merge( $all_fields['textarea_field']->get_field_props(), [ |
| 73 |
'label' => __( 'Abstract', 'weforms' ), |
| 74 |
'name' => 'abstract', |
| 75 |
] ), |
| 76 |
array_merge( $all_fields['textarea_field']->get_field_props(), [ |
| 77 |
'label' => __( 'Abstract', 'weforms' ), |
| 78 |
'name' => 'abstract', |
| 79 |
] ), |
| 80 |
array_merge( $all_fields['checkbox_field']->get_field_props(), [ |
| 81 |
'label' => 'Topics', |
| 82 |
'name' => 'topics', |
| 83 |
'options' => [ |
| 84 |
'firt_opic' => __( 'Topic First', 'weforms' ), |
| 85 |
'second_topic' => __( 'Topic Second', 'weforms' ), |
| 86 |
'third_topic' => __( 'Topic Third', 'weforms' ), |
| 87 |
], |
| 88 |
] ), |
| 89 |
array_merge( $all_fields['dropdown_field']->get_field_props(), [ |
| 90 |
'label' => 'Session Type', |
| 91 |
'name' => 'session_type', |
| 92 |
'options' => [ |
| 93 |
'presentation' => __( 'Presentation', 'weforms' ), |
| 94 |
'panel' => __( 'Panel', 'weforms' ), |
| 95 |
'workshop' => __( 'Work Shop', 'weforms' ), |
| 96 |
'other' => __( 'Other', 'weforms' ), |
| 97 |
], |
| 98 |
] ), |
| 99 |
array_merge( $all_fields['dropdown_field']->get_field_props(), [ |
| 100 |
'label' => 'Audience Level', |
| 101 |
'name' => 'audience_level', |
| 102 |
'options' => [ |
| 103 |
'novice' => __( 'Novice', 'weforms' ), |
| 104 |
'intermediate' => __( 'Intermediate', 'weforms' ), |
| 105 |
'expert' => __( 'Expert', 'weforms' ), |
| 106 |
], |
| 107 |
] ), |
| 108 |
array_merge( $all_fields['text_field']->get_field_props(), [ |
| 109 |
'label' => 'Video URL', |
| 110 |
'name' => 'video_url', |
| 111 |
] ), |
| 112 |
array_merge( $all_fields['textarea_field']->get_field_props(), [ |
| 113 |
'label' => __( 'Additional Information', 'weforms' ), |
| 114 |
'name' => 'additional_information', |
| 115 |
] ), |
| 116 |
]; |
| 117 |
|
| 118 |
return $form_fields; |
| 119 |
} |
| 120 |
} |
| 121 |
|