Problem:
The user would like to edit repeatable group in the same form as the parent post.
Solution:
A Toolset form is always tied to one post of one custom post type. As RFG fields are a different custom post type, they have to be entered in a different form, a form tied to the RFG custom post type.
So, we can't actually have one form for updating/creating the parent post and the RFG items. We'll need to have 2 forms. And we can't create and RFG item if the parent post is not already created.
If I did understand your use case, I'll suggest the following workflow for an example of a custom post type "Books" holding an RFG "Books comments":
- Create a form for adding Books. Configure the form to redirect to the book page after submission. Check this screenshot http://prntscr.com/tfhr6k
- Create a content template assigned to books, this template will display each book.
- Put inside this template an edit form for the book if you want.
- Create a for adding "Books Comments".
- Put this form inside the "Book" content template. If you visit a book in the frontend, you will see the form and you will be able to add RFG items(book comments) to the book. This form should be configured to "Keep displaying this form" after the user submits it.
- To display the RFG items, create a view for it, and put it in the content template. To make sure a new RFG will be displayed, the form for RFG should not use AJAX.
- Now if you want to edit RFG items, create and edit form for the RFG and put it in the loop of the view.
Relevant Documentation:
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: Africa/Casablanca (GMT+01:00)
This topic contains 4 replies, has 2 voices.
Last updated by 4 years, 4 months ago.
Assisted by: Jamal.