contact.php
93 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Contact form Template. |
| 4 | * |
| 5 | * @package EverestForms\Templates |
| 6 | * @version 1.0.0 |
| 7 | * @since 1.0.0 |
| 8 | */ |
| 9 | |
| 10 | defined( 'ABSPATH' ) || exit; |
| 11 | |
| 12 | $form_title = isset( $title ) ? sanitize_text_field( $title ) : esc_html__( 'Contact Form', 'everest-forms' ); |
| 13 | $form_name = isset( $title ) ? '- ' . $title : ''; |
| 14 | $form_template['contact'] = array( |
| 15 | 'form_field_id' => '1', |
| 16 | 'form_fields' => array( |
| 17 | 'fullname' => array( |
| 18 | 'id' => 'fullname', |
| 19 | 'type' => 'text', |
| 20 | 'label' => 'Name', |
| 21 | 'meta-key' => 'name', |
| 22 | 'description' => '', |
| 23 | 'required' => '1', |
| 24 | 'placeholder' => '', |
| 25 | 'css' => '', |
| 26 | ), |
| 27 | 'email' => array( |
| 28 | 'id' => 'email', |
| 29 | 'type' => 'email', |
| 30 | 'label' => 'Email', |
| 31 | 'meta-key' => 'email', |
| 32 | 'description' => '', |
| 33 | 'required' => '1', |
| 34 | 'placeholder' => '', |
| 35 | 'default_value' => '', |
| 36 | 'css' => '', |
| 37 | ), |
| 38 | 'subject' => array( |
| 39 | 'id' => 'subject', |
| 40 | 'type' => 'text', |
| 41 | 'label' => 'Subject', |
| 42 | 'meta-key' => 'subject', |
| 43 | 'description' => '', |
| 44 | 'required' => '1', |
| 45 | 'placeholder' => '', |
| 46 | 'css' => '', |
| 47 | ), |
| 48 | 'message' => array( |
| 49 | 'id' => 'message', |
| 50 | 'type' => 'textarea', |
| 51 | 'label' => 'Message', |
| 52 | 'meta-key' => 'message', |
| 53 | 'description' => '', |
| 54 | 'placeholder' => '', |
| 55 | 'css' => '', |
| 56 | ), |
| 57 | ), |
| 58 | 'settings' => array( |
| 59 | 'form_title' => $form_title, |
| 60 | 'form_desc' => '', |
| 61 | 'successful_form_submission_message' => get_option( 'everest_forms_successful_form_submission_message', __( 'Thanks for contacting us! We will be in touch with you shortly.', 'everest-forms' ) ), |
| 62 | 'redirect_to' => 'same', |
| 63 | 'custom_page' => '2', |
| 64 | 'external_url' => '', |
| 65 | 'layout_class' => 'default', |
| 66 | 'form_class' => '', |
| 67 | 'submit_button_text' => get_option( 'everest_forms_form_submit_button_label', __( 'Submit', 'everest-forms' ) ), |
| 68 | 'honeypot' => '1', |
| 69 | 'email' => array( |
| 70 | 'connection_1' => array( |
| 71 | 'connection_name' => __( 'Admin Notification', 'everest-forms' ), |
| 72 | 'evf_to_email' => '{admin_email}', |
| 73 | 'evf_from_name' => get_bloginfo( 'name', 'display' ), |
| 74 | 'evf_from_email' => '{admin_email}', |
| 75 | 'evf_reply_to' => '{field_id="email"}', |
| 76 | /* translators: %s: Form Name */ |
| 77 | 'evf_email_subject' => sprintf( esc_html__( 'New Form Entry %s', 'everest-forms' ), $form_name ), |
| 78 | 'evf_email_message' => '{all_fields}', |
| 79 | ), |
| 80 | ), |
| 81 | ), |
| 82 | 'structure' => array( |
| 83 | 'row_1' => array( |
| 84 | 'grid_1' => array( |
| 85 | 'fullname', |
| 86 | 'email', |
| 87 | 'subject', |
| 88 | 'message', |
| 89 | ), |
| 90 | ), |
| 91 | ), |
| 92 | ); |
| 93 |