Add comments
This commit is contained in:
@@ -35,6 +35,7 @@ function go_form_activate()
|
||||
rank tinyint(2) DEFAULT 0,
|
||||
email varchar(255) DEFAULT NULL,
|
||||
egd_number varchar(50) DEFAULT NULL,
|
||||
comment text DEFAULT NULL,
|
||||
created_at datetime DEFAULT CURRENT_TIMESTAMP NOT NULL,
|
||||
PRIMARY KEY (id),
|
||||
KEY form_id (form_id)
|
||||
@@ -107,7 +108,8 @@ function go_form_handle_submission()
|
||||
'club' => sanitize_text_field($_POST['club'] ?? ''),
|
||||
'rank' => intval($_POST['rank']),
|
||||
'email' => sanitize_email($_POST['email'] ?? ''),
|
||||
'egd_number' => sanitize_text_field($_POST['egd_number'] ?? '')
|
||||
'egd_number' => sanitize_text_field($_POST['egd_number'] ?? ''),
|
||||
'comment' => sanitize_textarea_field($_POST['comment'] ?? '')
|
||||
];
|
||||
|
||||
if (empty($data['first_name']) || empty($data['last_name'])) {
|
||||
|
||||
@@ -73,6 +73,8 @@
|
||||
|
||||
<label for="email">Email:</label><input type="email" name="email" id="email">
|
||||
<label for="egd_number">EGD Number:</label><input type="text" name="egd_number" id="egd_number">
|
||||
<label for="comment">Comment</label>
|
||||
<textarea name="comment" id="comment" rows="3"></textarea>
|
||||
<div id="egd-popup-overlay">
|
||||
<div id="egd-results">
|
||||
<button id="egd-popup-close" type="button" aria-label="Close">×</button>
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
<th>Email</th>
|
||||
<th>Date Added</th>
|
||||
<th>Action</th>
|
||||
<th>Comment</th>
|
||||
<?php endif; ?>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -38,7 +39,8 @@
|
||||
<input type="submit" value="Delete" class="button delete" onclick="return confirm('Delete this entry?')">
|
||||
</form>
|
||||
</td>
|
||||
|
||||
<td> <?= esc_html($e->comment) ?> </td>
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
</tr>
|
||||
|
||||
Reference in New Issue
Block a user