PluginProbe
Hash Form – Drag & Drop Form Builder / trunk
Hash Form – Drag & Drop Form Builder vtrunk
1.4.4 1.4.3 1.4.2 1.4.1 1.1.1 1.1.2 1.1.3 1.1.4 1.1.5 1.1.6 1.1.7 1.1.8 1.1.9 1.2.0 1.2.1 1.2.2 1.2.3 1.2.4 1.2.5 1.2.6 1.2.6.1 1.2.7 1.2.8 1.2.9 1.3.0 All 47 releases
hash-form / admin / forms / settings / auto-responder.php

auto-responder.php in Hash Form – Drag & Drop Form Builder trunk, at admin/forms/settings/auto-responder.php

62 lines 2.8 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 defined('ABSPATH') || die();
3 /*
4 * A template, included from inside a class method - never loaded on its own.
5 * The variables below are locals of the method that includes it, not globals,
6 * which is what the prefix sniff assumes about a file-scope assignment.
7 */
8 // phpcs:disable WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound -- included from within a method, so these are function locals.
9 ?>
10
11 <div class="hf-form-container">
12 <div class="hf-form-row">
13 <label><?php esc_html_e('Enable Auto Responder', 'hash-form'); ?></label>
14 <div class="hf-setting-fields hf-toggle-input-field">
15 <input type="hidden" name="enable_ar" value="off">
16 <input type="checkbox" name="enable_ar" value="on" data-condition="toggle" id="hf-enable-ar" <?php checked($settings['enable_ar'], 'on', true); ?>>
17 </div>
18 </div>
19
20 <?php
21 // Everything below only applies once the responder is on, so it is
22 // grouped and hung off the switch rather than sitting there looking
23 // active while nothing sends. One group, not one rule per row.
24 ?>
25 <div data-condition-toggle="hf-enable-ar">
26 <div class="hf-form-row">
27 <label><?php esc_html_e('From Email', 'hash-form'); ?></label>
28 <input type="text" name="from_ar" value="<?php echo esc_attr($settings['from_ar']) ?>" />
29 </div>
30
31 <div class="hf-form-row">
32 <label><?php esc_html_e('From Name', 'hash-form'); ?></label>
33 <input type="text" name="from_ar_name" value="<?php echo esc_attr($settings['from_ar_name']) ?>" />
34 </div>
35
36 <div class="hf-form-row">
37 <label><?php esc_html_e('Reply To Email', 'hash-form'); ?></label>
38 <select name="reply_to_ar">
39 <option value=""><?php esc_html_e('Choose a Form Field', 'hash-form'); ?></option>
40 <?php
41 foreach ($fields as $field) {
42 if ($field->type == 'email') {
43 ?>
44 <option value="<?php echo esc_attr($field->id); ?>" <?php selected($settings['reply_to_ar'], $field->id); ?>><?php echo esc_html($field->name); ?></option>
45 <?php
46 }
47 }
48 ?>
49 </select>
50 </div>
51
52 <div class="hf-form-row">
53 <label> <?php esc_html_e('Subject', 'hash-form'); ?></label>
54 <input type="text" name="email_subject_ar" value="<?php echo esc_attr($settings['email_subject_ar']) ?>" />
55 </div>
56
57 <div class="hf-form-row">
58 <label><?php esc_html_e('Message', 'hash-form'); ?></label>
59 <textarea name="email_message_ar" cols="50" rows="5"><?php echo ($settings['email_message_ar'] ? esc_textarea($settings['email_message_ar']) : ''); ?></textarea>
60 </div>
61 </div>
62 </div>