PluginProbe
weForms – Easy Drag & Drop Contact Form Builder For WordPress / 1.2.9
weForms – Easy Drag & Drop Contact Form Builder For WordPress v1.2.9
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
← All changes | includes/templates/class-template-to-do-list.php +76 -73 1.6.71.2.9 View file →
@@ -1,73 +1,76 @@
1 -<?php
2 -
3 -/**
4 - * Blank form template
5 - */
6 -class WeForms_Template_Todo_List extends WeForms_Form_Template {
7 -
8 - public function __construct() {
9 - parent::__construct();
10 -
11 - $this->enabled = class_exists( 'WeForms_Pro' );
12 - $this->title = __( 'Todo List Form', 'weforms' );
13 - $this->description = __( 'Get to do reminders with this online form to remember and track your to do list with the help of your form users.', 'weforms' );
14 - $this->image = WEFORMS_ASSET_URI . '/images/form-template/to-do-list.png';
15 - $this->category = 'others';
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 = [
27 - array_merge( $all_fields['text_field']->get_field_props(), [
28 - 'required' => 'yes',
29 - 'label' => __( 'Item Name', 'weforms' ),
30 - 'name' => 'item_name',
31 - ] ),
32 -
33 - array_merge( $all_fields['textarea_field']->get_field_props(), [
34 - 'label' => __( 'Additional Notes', 'weforms' ),
35 - 'name' => 'additional_notes',
36 - ] ),
37 -
38 - array_merge( $all_fields['date_field']->get_field_props(), [
39 - 'required' => 'yes',
40 - 'label' => __( 'Due Date', 'weforms' ),
41 - 'name' => 'due_date',
42 - ] ),
43 -
44 - array_merge( $all_fields['dropdown_field']->get_field_props(), [
45 - 'required' => 'yes',
46 - 'label' => __( 'Priority', 'weforms' ),
47 - 'name' => 'priority',
48 - 'options' => [
49 - 'normal' => 'Normal',
50 - 'urgent' => 'Urgent',
51 - ],
52 - 'selected' => 'normal',
53 - ] ),
54 - ];
55 -
56 - return $form_fields;
57 - }
58 -
59 - /**
60 - * Get default settings
61 - *
62 - * @return array
63 - */
64 - public function get_default_settings() {
65 - return [
66 - 'redirect_to' => 'same',
67 - 'message' => __( 'Thanks for contacting us! We will get in touch with you shortly.', 'weforms' ),
68 - 'page_id' => '',
69 - 'url' => '',
70 - 'submit_text' => __( 'Submit', 'weforms' ),
71 - ];
72 - }
73 -}
1 +<?php
2 +
3 +/**
4 + * Blank form template
5 + */
6 +class WeForms_Template_Todo_List extends WeForms_Form_Template {
7 +
8 + public function __construct() {
9 + parent::__construct();
10 +
11 + $this->enabled = class_exists('WeForms_Pro');
12 + $this->title = __('Todo List Form', 'weforms');
13 + $this->description = __('Get to do reminders with this online form to remember and track your to do list with the help of your form users.', 'weforms');
14 + $this->image = WEFORMS_ASSET_URI . '/images/form-template/to-do-list.png';
15 + $this->category = 'others';
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['text_field']->get_field_props(), array(
30 + 'required' => 'yes',
31 + 'label' => __('Item Name', 'weforms'),
32 + 'name' => 'item_name',
33 + )),
34 +
35 + array_merge($all_fields['textarea_field']->get_field_props(), array(
36 + 'label' => __('Additional Notes', 'weforms'),
37 + 'name' => 'additional_notes',
38 + )),
39 +
40 + array_merge($all_fields['date_field']->get_field_props(), array(
41 + 'required' => 'yes',
42 + 'label' => __('Due Date', 'weforms'),
43 + 'name' => 'due_date',
44 + )),
45 +
46 + array_merge($all_fields['dropdown_field']->get_field_props(), array(
47 + 'required' => 'yes',
48 + 'label' => __('Priority', 'weforms'),
49 + 'name' => 'priority',
50 + 'options' => array(
51 + 'normal' => 'Normal',
52 + 'urgent' => 'Urgent',
53 + ),
54 + 'selected' => 'normal',
55 + )),
56 + );
57 +
58 + return $form_fields;
59 + }
60 +
61 + /**
62 + * Get default settings
63 + *
64 + * @return array
65 + */
66 + public function get_default_settings() {
67 + return array(
68 + 'redirect_to' => 'same',
69 + 'message' => __('Thanks for contacting us! We will get in touch with you shortly.', 'weforms'),
70 + 'page_id' => '',
71 + 'url' => '',
72 + 'submit_text' => __('Submit', 'weforms'),
73 + );
74 + }
75 +
76 +}