Skip Navigation

[Resolved] Including repeating relationship fields in a form

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.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Karachi (GMT+05:00)

Author
Posts
#2605963

Hi there,

I'm creating a basic event planning platform and have 4 custom post types:

Clients
Events
Activities
Venues

I've created many-to-many relationships for the Events, Activities (Events > Activities) and Venues (Venues > Events) post types, and a one-to-many relationship for the Clients > Events.

I'm now trying to create a 'Build an Event' form where I can choose the Client, Venue and multiple Activities and output a page with the details.

I should know the answer to this but cant for the life of me get a single form to do this. It will show the one-to-many relationship but not the many-to-many. Looking at other support replies, I can see that they need to be created as relationship forms, but how do I then get them into the 'main' form?

Any thoughts or ideas most welcomed.

Best regards
James

#2606279

Hi James,

Thank you for contacting us and I'd be happy to assist.

Whenever many-to-many relationships are involved, you'll need to use a separate relationship form to make each new connection.

The regular post forms can be used, only when a single post can be connected to the post that is being created or edited.

Based on what you've shared, you can set up one form to create a new 'Events' post. Then once the post has been created, you can redirect the user to that single event post page.

On this page, users can see the two separate relationship forms, one to join the current event with the 'Clients' and the other to join the current event with the 'Activities'.
( ref: https://toolset.com/lesson-placement/lesson-placements-1729031-1727277/ )

I hope this helps and please let me know if you need further assistance.

regards,
Waqar

#2607403

Hi Waqar,

Many thanks for solving that! Perfect.

Kind regards
James