I'm new to wordpress and hence facing some issues.
The use case scenario is as follows:
- A user is displayed an application form to start a club in his school.
- The user fills the form and hits the 'Submit' button.
- The form needs to be validated.
- If the validation is successful, then data is stored in custom table
club_detailsin db and the user is shown some message(eg: Thanks for submission. Your application is sent to the admin for approval.) else appropriate error messages are shown to the user.
- The admin goes to the Wordpress admin panel to approve the pending requests for the club. (The data is fetched from db and shown to the admin).
I have done the following:
- for 1) I have created a application form/page using the Wordpress HTML editor.
validation.js) that has the validation code.
- for 4) I have a php file (
club-functions.php) that has a function
storeInDB()to store the application details in custom table in db.
- for 5) I have created my own plugin folder and added a php file (
club.php) that displays the application details to the admin on the Wordpress admin panel.
Please provide me some suggestions on how do I achieve this and is this approach good? Thanks a lot in advance.