I'm trying to create an events plugin and so far, I'm through with the following:
- A short-code that displays a form on the front-end to the user.
- The event display page that renders the output.
- 'Events' as custom post type and several custom-fields for additional event information.
Problems:
I want to restrict the users from submitting more than one event.
If the user has already published an event, he/she should be presented with a form that has their earlier values (aka values of custom fields) prefilled. They can edit these values and save to update the event display page.
If they haven't published any event before, show a blank form with regular placeholders.
I'm unable to think about any approach to address this issue. Would really appreciate if you could point me in the right direction.
Thank you for your time and I look forward to getting response.