class-base.php
5 years ago
class-blank.php
5 years ago
class-contact.php
5 years ago
class-subscribe.php
5 years ago
class-suggestion.php
5 years ago
class-suggestion.php
97 lines
| 1 | <?php |
| 2 | |
| 3 | /** |
| 4 | * Suggestion form template. |
| 5 | * |
| 6 | * @since 1.1.3.2 |
| 7 | */ |
| 8 | class WPForms_Template_Suggestion extends WPForms_Template { |
| 9 | |
| 10 | /** |
| 11 | * Primary class constructor. |
| 12 | * |
| 13 | * @since 1.0.0 |
| 14 | */ |
| 15 | public function init() { |
| 16 | |
| 17 | $this->name = esc_html__( 'Suggestion Form', 'wpforms-lite' ); |
| 18 | $this->slug = 'suggestion'; |
| 19 | $this->description = esc_html__( 'Ask your users for suggestions with this simple form template. You can add and remove fields as needed.', 'wpforms-lite' ); |
| 20 | $this->includes = ''; |
| 21 | $this->icon = ''; |
| 22 | $this->modal = ''; |
| 23 | $this->core = true; |
| 24 | $this->data = array( |
| 25 | 'field_id' => '5', |
| 26 | 'fields' => array( |
| 27 | '0' => array( |
| 28 | 'id' => '0', |
| 29 | 'type' => 'name', |
| 30 | 'label' => esc_html__( 'Name', 'wpforms-lite' ), |
| 31 | 'required' => '1', |
| 32 | 'size' => 'medium', |
| 33 | ), |
| 34 | '1' => array( |
| 35 | 'id' => '1', |
| 36 | 'type' => 'email', |
| 37 | 'label' => esc_html__( 'Email', 'wpforms-lite' ), |
| 38 | 'description' => esc_html__( 'Please enter your email, so we can follow up with you.', 'wpforms-lite' ), |
| 39 | 'required' => '1', |
| 40 | 'size' => 'medium', |
| 41 | ), |
| 42 | '2' => array( |
| 43 | 'id' => '2', |
| 44 | 'type' => 'radio', |
| 45 | 'label' => esc_html__( 'Which department do you have a suggestion for?', 'wpforms-lite' ), |
| 46 | 'choices' => array( |
| 47 | '1' => array( |
| 48 | 'label' => esc_html__( 'Sales', 'wpforms-lite' ), |
| 49 | ), |
| 50 | '2' => array( |
| 51 | 'label' => esc_html__( 'Customer Support', 'wpforms-lite' ), |
| 52 | ), |
| 53 | '3' => array( |
| 54 | 'label' => esc_html__( 'Product Development', 'wpforms-lite' ), |
| 55 | ), |
| 56 | '4' => array( |
| 57 | 'label' => esc_html__( 'Other', 'wpforms-lite' ), |
| 58 | ), |
| 59 | ), |
| 60 | 'required' => '1', |
| 61 | ), |
| 62 | '3' => array( |
| 63 | 'id' => '3', |
| 64 | 'type' => 'text', |
| 65 | 'label' => esc_html__( 'Subject', 'wpforms-lite' ), |
| 66 | 'required' => '1', |
| 67 | 'size' => 'medium', |
| 68 | ), |
| 69 | '4' => array( |
| 70 | 'id' => '4', |
| 71 | 'type' => 'textarea', |
| 72 | 'label' => esc_html__( 'Message', 'wpforms-lite' ), |
| 73 | 'required' => '1', |
| 74 | 'size' => 'medium', |
| 75 | ), |
| 76 | ), |
| 77 | 'settings' => array( |
| 78 | 'notifications' => array( |
| 79 | '1' => array( |
| 80 | 'replyto' => '{field_id="1"}', |
| 81 | 'sender_name' => '{field_id="0"}', |
| 82 | 'sender_address' => '{admin_email}', |
| 83 | ), |
| 84 | ), |
| 85 | 'antispam' => '1', |
| 86 | 'confirmation_message_scroll' => '1', |
| 87 | 'submit_text_processing' => esc_html__( 'Sending...', 'wpforms-lite' ), |
| 88 | ), |
| 89 | 'meta' => array( |
| 90 | 'template' => $this->slug, |
| 91 | ), |
| 92 | ); |
| 93 | } |
| 94 | } |
| 95 | |
| 96 | new WPForms_Template_Suggestion; |
| 97 |