3.6 KiB
3.6 KiB
Go Form Plugin
A WordPress plugin for managing Go (Baduk/Weiqi) tournament registrations. Collect player information through frontend forms and export entries to popular tournament management systems.
Features
- Frontend Registration Form with shortcode support
- EGD Database Integration - Search and auto-fill player data from the European Go Database
- Rank Selection - Dropdown with ranks from 30k to 9p
- Automatic Rating Calculation - Auto-computes rating from rank when needed
- Multiple Export Formats - CSV, Pairgoth (JSON), OpenGotha (XML), McMahon (XML)
- Multi-Form Support - Create and manage multiple registration forms
- Admin Dashboard - View, delete, and export entries
Installation
- Upload the
go-form-pluginfolder to your/wp-content/plugins/directory - Activate the plugin through the 'Plugins' menu in WordPress
- A default form is automatically created on activation
Usage
Displaying a Form
Use the shortcode to display a registration form on any page or post:
[go_form id=1]
Replace 1 with your form ID. Find form IDs in the admin settings page.
Admin Settings
Navigate to Go Form in the WordPress admin menu to:
- Create Forms - Add new registration forms
- Manage Forms - View all forms with their shortcodes
- View Entries - See all submissions for a form
- Delete Entries - Remove individual registrations
- Delete Forms - Remove a form and all its entries (cannot delete default form)
- Export Data - Download entries in various tournament formats
EGD Search
Players can click the "Search EGD" button on the frontend form to look up their information in the European Go Database. This auto-fills:
- First Name
- Last Name
- Country
- Club
- Rank
- EGD Number
- Rating
Export Formats
| Format | File Extension | Description |
|---|---|---|
| CSV | .csv |
Standard spreadsheet format |
| Pairgoth | .tour |
JSON format for Pairgoth pairing system |
| OpenGotha | .xml |
XML format for OpenGotha tournament manager |
| McMahon | .xml |
XML format for McMahon tournament system |
Database
The plugin creates two tables:
wp_go_form_forms- Stores form definitionswp_go_form_entries- Stores all player registrations
Both tables are automatically removed when the plugin is uninstalled.
Requirements
- WordPress 5.0 or higher
- PHP 7.4 or higher
- MySQL 5.6 or higher
Fields Collected
| Field | Required | Description |
|---|---|---|
| First Name | Yes | Player's first name |
| Last Name | Yes | Player's last name |
| Country | Yes | Country code (2-3 letters) |
| Club | Yes | Club name |
| Rank | Yes | Go rank (30k to 9p) |
| Rating | No | EGD rating (auto-calculated from rank if missing) |
| No | Email address | |
| EGD Number | No | European Go Database PIN |
| Comment | No | Additional notes |
Hooks
Actions
admin_post_go_form_handle_submission- Form submission handleradmin_post_go_form_delete_entry- Delete entry handleradmin_post_go_form_create_form- Create form handleradmin_post_go_form_delete_form- Delete form handleradmin_post_go_form_export_csv- CSV export handleradmin_post_go_form_export_pairgoth- Pairgoth export handleradmin_post_go_form_export_opengotha- OpenGotha export handleradmin_post_go_form_export_mcmahon- McMahon export handler
Security
- All forms use WordPress nonces for CSRF protection
- Admin actions require
manage_optionscapability - All input is sanitized using WordPress sanitization functions
- Direct file access is blocked
Author
Nikola Petrov