class-base.php
9 years ago
class-blank.php
9 years ago
class-contact.php
9 years ago
class-suggestion.php
9 years ago
class-contact.php
71 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Contact form template. |
| 4 | * |
| 5 | * @package WPForms |
| 6 | * @author WPForms |
| 7 | * @since 1.0.0 |
| 8 | * @license GPL-2.0+ |
| 9 | * @copyright Copyright (c) 2016, WPForms LLC |
| 10 | */ |
| 11 | class WPForms_Template_Contact extends WPForms_Template { |
| 12 | |
| 13 | /** |
| 14 | * Primary class constructor. |
| 15 | * |
| 16 | * @since 1.0.0 |
| 17 | */ |
| 18 | public function init() { |
| 19 | |
| 20 | $this->name = __( 'Simple Contact Form', 'wpforms' ); |
| 21 | $this->slug = 'contact'; |
| 22 | $this->description = __( 'Allow your users to contact you with this simple contact form. You can add and remove fields as needed.', 'wpforms' ); |
| 23 | $this->includes = ''; |
| 24 | $this->icon = ''; |
| 25 | $this->modal = ''; |
| 26 | $this->data = array( |
| 27 | 'field_id' => '3', |
| 28 | 'fields' => array( |
| 29 | '0' => array( |
| 30 | 'id' => '0', |
| 31 | 'type' => 'name', |
| 32 | 'label' => __( 'Name', 'wpforms' ), |
| 33 | 'required' => '1', |
| 34 | 'size' => 'medium', |
| 35 | ), |
| 36 | '1' => array( |
| 37 | 'id' => '1', |
| 38 | 'type' => 'email', |
| 39 | 'label' => __( 'E-mail', 'wpforms' ), |
| 40 | 'required' => '1', |
| 41 | 'size' => 'medium', |
| 42 | ), |
| 43 | '2' => array( |
| 44 | 'id' => '2', |
| 45 | 'type' => 'textarea', |
| 46 | 'label' => __( 'Comment or Message', 'wpforms' ), |
| 47 | 'description' => '', |
| 48 | 'required' => '1', |
| 49 | 'size' => 'medium', |
| 50 | 'placeholder' => '', |
| 51 | 'css' => '', |
| 52 | ), |
| 53 | ), |
| 54 | 'settings' => array( |
| 55 | 'notifications' => array( |
| 56 | '1' => array( |
| 57 | 'sender_name' => '{field_id="0"}', |
| 58 | 'sender_address' => '{field_id="1"}', |
| 59 | ), |
| 60 | ), |
| 61 | 'honeypot' => '1', |
| 62 | 'confirmation_message_scroll' => '1', |
| 63 | 'submit_text_processing' => __( 'Sending...', 'wpforms' ), |
| 64 | ), |
| 65 | 'meta' => array( |
| 66 | 'template' => $this->slug, |
| 67 | ), |
| 68 | ); |
| 69 | } |
| 70 | } |
| 71 | new WPForms_Template_Contact; |