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 / email-settings.php

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

118 lines 5.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 <div class="hf-form-container">
11 <div class="hf-form-row hf-multiple-rows">
12 <label><?php esc_html_e('To Email', 'hash-form'); ?></label>
13 <div class="hf-multiple-email">
14 <?php
15 $email_to_array = explode(',', $settings['email_to']);
16 foreach ($email_to_array as $row) {
17 ?>
18 <div class="hf-email-row">
19 <input type="email" name="email_to[]" autocomplete="off" value="<?php echo esc_attr($row); ?>" />
20 <span class="mdi mdi-trash-can-outline hf-delete-email-row"></span>
21 </div>
22 <?php } ?>
23 </div>
24 <button type="button" class="button button-primary hf-add-email"><?php esc_html_e('Add More Email', 'hash-form'); ?></button>
25 <p></p>
26 <p class="hf-desc"><?php esc_html_e('Use [admin_email] for admin email. Settings > General > Administration Email Address', 'hash-form'); ?></p>
27 </div>
28
29 <div class="hf-form-row">
30 <label class="hf-label-with-attr">
31 <?php esc_html_e('Reply To', 'hash-form'); ?>
32 <div class="hf-attr-field">
33 <div class="hf-attr-field-tags">
34 <span class="mdi mdi-tag-multiple"></span>Tags
35 </div>
36 <ul class="hf-add-field-attr-to-form">
37 <?php
38 foreach ($fields as $field) {
39 if ($field->type == 'email') {
40 ?>
41 <li data-value="#field_id_<?php echo esc_attr($field->id); ?>">
42 <?php echo esc_html($field->name); ?><span>#field_id_<?php echo esc_html($field->id); ?></span>
43 </li>
44 <?php
45 }
46 }
47 ?>
48 </ul>
49 </div>
50 </label>
51 <input type="text" name="reply_to_email" autocomplete="off" value="<?php echo esc_attr($settings['reply_to_email']); ?>" />
52 <p class="hf-desc"><?php esc_html_e('Choose the email field by clicking on the TAGS above.', 'hash-form'); ?></p>
53 </div>
54
55 <div class="hf-form-row">
56 <label><?php esc_html_e('From Email', 'hash-form'); ?></label>
57 <input type="text" name="email_from" value="<?php echo esc_attr($settings['email_from']); ?>" />
58 <p class="hf-desc"><?php esc_html_e('Use [admin_email] for admin email. Settings > General > Administration Email Address', 'hash-form'); ?></p>
59 <p class="hf-settings-note"><?php esc_html_e('The address should be on your own domain for reliable delivery — for example admin@yourwebsite.com.', 'hash-form'); ?></p>
60 </div>
61
62 <div class="hf-form-row">
63 <label><?php esc_html_e('From Name', 'hash-form'); ?></label>
64 <input type="text" name="email_from_name" value="<?php echo esc_attr($settings['email_from_name']); ?>" />
65 </div>
66
67 <div class="hf-form-row">
68 <label class="hf-label-with-attr">
69 <?php esc_html_e('Subject', 'hash-form'); ?>
70 <div class="hf-attr-field">
71 <div class="hf-attr-field-tags">
72 <span class="mdi mdi-tag-multiple"></span>Tags
73 </div>
74 <ul class="hf-add-field-attr-to-form">
75 <?php
76 foreach ($fields as $field) {
77 if (!($field->type == 'heading' || $field->type == 'paragraph' || $field->type == 'separator' || $field->type == 'spacer' || $field->type == 'image' || $field->type == 'captcha')) {
78 ?>
79 <li data-value="#field_id_<?php echo esc_attr($field->id); ?>">
80 <?php echo esc_html($field->name); ?><span>#field_id_<?php echo esc_html($field->id); ?></span>
81 </li>
82 <?php
83 }
84 }
85 ?>
86 </ul>
87 </div>
88 </label>
89
90 <input type="text" name="email_subject" value="<?php echo esc_attr($settings['email_subject']); ?>" />
91 </div>
92
93 <div class="hf-form-row">
94 <label class="hf-label-with-attr">
95 <?php esc_html_e('Message', 'hash-form'); ?>
96 <div class="hf-attr-field">
97 <div class="hf-attr-field-tags">
98 <span class="mdi mdi-tag-multiple"></span>Tags
99 </div>
100 <ul class="hf-add-field-attr-to-form">
101 <?php
102 foreach ($fields as $field) {
103 if (!(in_array($field->type, array('heading', 'paragraph', 'separator', 'spacer', 'image', 'captcha', 'gdpr_agreement')))) {
104 ?>
105 <li data-value="#field_id_<?php echo esc_attr($field->id); ?>">
106 <?php echo esc_html($field->name); ?><span>#field_id_<?php echo esc_html($field->id); ?></span>
107 </li>
108 <?php
109 }
110 }
111 ?>
112 </ul>
113 </div>
114 </label>
115 <textarea name="email_message" rows="5"><?php echo esc_textarea($settings['email_message']); ?></textarea>
116 <p class="hf-desc"><?php esc_html_e('Use #form_title for form title, #form_details for form inputs', 'hash-form'); ?></p>
117 </div>
118 </div>