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?
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/
I would like to know, how can I add many other charges for one rental before the rental form is submitted?
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