Skip Navigation

[Resolved] Add items to one post type (repeatable group or one to many relationship)

This support ticket is created 5 years, 7 months ago. There's a good chance that you are reading advice that it now obsolete.

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.

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/Hong_Kong (GMT+08:00)

This topic contains 3 replies, has 2 voices.

Last updated by Luo Yang 5 years, 7 months ago.

Assisted by: Luo Yang.

Author
Posts
#1271395

Tell us what you are trying to do?

I have post type called Rental. For the Rental I want to be able to add as many other charges as I want. For that I created a post form for rental and a repeatable group in rental post type called "other charge". I created another form for the other charge repeatable group and the link to add other charge is in Rental form. Unfortunately, it is not working as expected. So, I would like to know what is the best way to add items for Rental before saving Rental form?

#1271417

Hello,

The "Repeatable Group" of Types plugin is based on one-to-many relationship, so each item of Repeatable Group is a post actually.

But Toolset form can not handle only one post at the same time, so you will need to create another post form for creating item of "Repeatable Group", see our document:
Front-end Forms For Repeatable Field Groups
https://toolset.com/documentation/getting-started-with-toolset/creating-and-displaying-repeatable-field-groups/front-end-forms-for-repeatable-field-groups/

#1271773

I would like to know, how can I add many other charges for one rental before the rental form is submitted?

#1272167

I suggest you try these:

1) Create three post forms:
- "Add Rental form": Form for creating "Rental" post
- "Add item form": Form for creating item of "Repeatable Group"
- "Editing Rental form": Form for editing "Rental" post

2) The workflow like this:
User create new "Rental" post, redirect him to single "Rental" post, here display these:
- Post view lists items of "Repeatable Group"
https://toolset.com/documentation/getting-started-with-toolset/creating-and-displaying-repeatable-field-groups/#displaying-repeatable-field-groups
- Add child item of "Repeatable Group" link
https://toolset.com/documentation/post-relationships/selecting-parent-posts-using-forms-create-child-items/
- Edit "Rental" post form link
https://toolset.com/documentation/getting-started-with-toolset/publish-content-from-the-front-end/forms-for-editing/#2-create-a-content-template-for-displaying-the-editing-form