move to template

This commit is contained in:
2026-05-05 00:35:48 +02:00
parent 5902050221
commit 4b26bdc223
2 changed files with 23 additions and 21 deletions

View File

@@ -0,0 +1,21 @@
<div class="go-form-container" 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><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 (0-40):</label></td><td><input type="number" name="rank" id="rank" min="0" max="40" value="0"></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>
<p>* Required fields</p>
<input type="submit" name="go_form_submit" value="Submit" class="go-form-submit">
</form>
<h2>Players</h2>
<?php go_form_render_entries_table(go_form_get_entries($form_id)); ?>
</div>