remove table

This commit is contained in:
2026-05-05 22:20:33 +02:00
parent 5cfd377b53
commit 44653283c8
2 changed files with 12 additions and 14 deletions

View File

@@ -153,10 +153,10 @@ function go_form_shortcode($atts) {
$msg = '';
if (isset($_GET['form_success']) && $_GET['form_success'] == 1)
$msg = '<div class="go-form-success">Entry added successfully!</div>';
$msg = '<div>Entry added successfully!</div>';
elseif (isset($_GET['form_error'])) {
$errors = ['1' => 'Please fill in all required fields.', 'rank' => 'Rank must be 0-40.', 'email' => 'Please enter a valid email.'];
$msg = '<div class="go-form-error">'.esc_html($errors[$_GET['form_error']] ?? $errors['1']).'</div>';
$msg = '<div>'.esc_html($errors[$_GET['form_error']] ?? $errors['1']).'</div>';
}
ob_start();

View File

@@ -42,22 +42,20 @@
}
</style>
<div class="go-form-container" id="form">
<div id="form">
<h2>Add New Player</h2>
<form method="post" action="<?php echo admin_url('admin-post.php'); ?>">
<?php echo wp_nonce_field('go_form_action', 'go_form_nonce', true, false); ?>
<input type="hidden" name="action" value="go_form_submit">
<input type="hidden" name="form_id" value="<?php echo esc_attr($form_id); ?>">
<table class="go-form-table">
<tr><td><label for="first_name">First Name*:</label></td><td><input type="text" name="first_name" id="first_name" required></td></tr>
<tr><td><label for="last_name">Last Name*:</label></td><td><input type="text" name="last_name" id="last_name" required></td></tr>
<tr><td></td><td><button type="button" id="egd-search" class="button">Search EGD</button></td></tr>
<tr><td><label for="country">Country:</label></td><td><input type="text" name="country" id="country"></td></tr>
<tr><td><label for="club">Club:</label></td><td><input type="text" name="club" id="club"></td></tr>
<tr><td><label for="rank">Rank:</label></td><td><?php go_form_get_rank_dropdown(); ?></td></tr>
<tr><td><label for="email">Email:</label></td><td><input type="email" name="email" id="email"></td></tr>
<tr><td><label for="egd_number">EGD Number:</label></td><td><input type="text" name="egd_number" id="egd_number"></td></tr>
</table>
<label for="first_name">First Name*:</label><input type="text" name="first_name" id="first_name" required>
<label for="last_name">Last Name*:</label><input type="text" name="last_name" id="last_name" required>
<button type="button" id="egd-search" class="button">Search EGD</button>
<label for="country">Country:</label><input type="text" name="country" id="country">
<label for="club">Club:</label><input type="text" name="club" id="club">
<label for="rank">Rank:</label><?php go_form_get_rank_dropdown(); ?>
<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">
<div id="egd-popup-overlay">
<div id="egd-results">
<button id="egd-popup-close" type="button" aria-label="Close">&times;</button>
@@ -66,7 +64,7 @@
</div>
</div>
<p>* Required fields</p>
<input type="submit" name="go_form_submit" value="Submit" class="go-form-submit">
<input type="submit" name="go_form_submit" value="Submit">
</form>
<h2>Players</h2>
<?php go_form_render_entries_table(go_form_get_entries($form_id)); ?>