Skip Navigation

[Resolved] Using a Post Form to create multiple posts on a single form submission.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

This topic contains 1 reply, has 1 voice.

Last updated by brettB-4 1 year, 8 months ago.

Author
Posts
#2605677

We have a post form set up to create Matches. This form can be seen here:

hidden link

This form simply provides a date/time field and then two fields to select Team 1 and Team 2. Everything with this is working perfectly. But now our league director has informed me that within each Match, there are actually four separate Games that are played. There is one Game of Men's Doubles, one Game of Women's Doubles, and two Games of Mixed Doubles. The four Games together comprise the Match.

To account for this, I'm thinking we might need to set up a new content type called Game and set up a relationship to Match where there are four child Games per parent Match. I'm not positive on this. Does that make sense to do it that way?

Right now, this form only creates a single Match. What we'd like it to do is to also create the four Games if I set it up that way. Or if there is another way to auto-generate the creation of the four Games upon the creation of the Match that would be OK too. But if these Games can be generated by any means, there would also need to be a way for the type of game (men's, women's, mixed 1, mixed 2) to be designated in some way within each of the four Games. That can likely be done with a taxonomy, but I'm not sure if there is a way to get the Post Form (or other method) to not only create the four Game posts, but also populate a taxonomy with four different options automatically, one for each game type.

If we can do this, then the person creating the Schedule page will only have to fill out the form once to provide the team names and then each Game within the Match would auto-generate. Otherwise, we're going to have to create four Game posts for each Match and that is probably going to be problematic for the number of games that will be necessary. I'm thinking that would require too much extra work to do it that way, or at least more work than it will be worth to my client.

I'm trying to develop this Schedule and Results system for this site using Toolset. If I can succeed with this, we will attempt to get MANY more clients showing them this system as a proof-of-concept. If you have any thoughts on how this can be achieved using Toolset, I'd definitely appreciate your input. If it simply can't be done, that's understood.

#2605723

You can delete this ticket. I figured out another approach that is better than this.