Skip Navigation

[Closed] Repeater custom post field call in post 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.

Author
Posts
#2114107

Hi Team,

I have created a custom post type and its fields using toolset and also i have create a post form for custom post type but the repeater field is not displayed or called on this form. I have also tried the below link but still facing issues.
https://toolset.com/course-lesson/front-end-forms-for-repeatable-field-groups/

For more details please see below video link.
hidden link

Backend Custom Field group link: hidden link
Backend Post Form link: hidden link
Front End Form Link: hidden link

Please do configure it or provide me solutions for it.

Thanks

#2114387

Christian Cox
Supporter

Languages: English (English )

Timezone: America/New_York (GMT-04:00)

i have create a post form for custom post type but the repeater field is not displayed or called on this form.
Hello, it is expected that RFGs and their parent posts are managed in separate Forms. A Form that manages the parent post type cannot also manage its internal RFGs. That is not possible with built-in Toolset features, only with custom code. Here is an example workflow for creating a post with RFG using separate Forms:
- User creates the main "parent" post with Forms. This includes custom fields, apart from the Repeatable Field Group.
- User submits the Form and is redirected to parent post on the front-end of the site.
- The Content Template applied to the parent post type includes a View of the RFG for this post. At first this View will be empty since no RFGs exist yet. Instead, a link is displayed to add some RFG rows.
- User clicks link to add an RFG row and is redirected to a Form that creates one row of the RFG in the parent post.
- User submits the RFG Form and is automatically redirected to the parent post. The View of RFG is updated and shows the recent RFG row submission, as well as links to edit or delete each row of the RFG.
- User can click to add another RFG row, or edit/delete existing row.

Please do configure it or provide me solutions for it.
If you are looking for a custom solution that allows you to manage RFGs in the same Form that manages the parent post type, you will need to work with a developer to create a custom solution. This customization is not something we can provide for you here in the support forums. We can assist with any Toolset APIs, or provide simple example code for accomplishing a simple task. Our support policy is outlined here:
https://toolset.com/toolset-support-policy

I have also tried the below link but still facing issues.
I can provide more guidance if you'd like to discuss details of the issues you still face.

#2119861

Hello, it is expected that RFGs and their parent posts are managed in separate Forms. A Form that manages the parent post type cannot also manage its internal RFGs. That is not possible with built-in Toolset features, only with custom code. Here is an example workflow for creating a post with RFG using separate Forms:
Comment: How can I assign/create a parent post and how to manage it with separate forms? I have tried it but there is no option for creating a parent post? Please explain with a screenshot step by step also i have tried analysis in your support blog but not getting a related solution for it.

#2120093

Christian Cox
Supporter

Languages: English (English )

Timezone: America/New_York (GMT-04:00)

Comment: How can I assign/create a parent post and how to manage it with separate forms? I have tried it but there is no option for creating a parent post? Please explain with a screenshot step by step also i have tried analysis in your support blog but not getting a related solution for it.
In your case, you can think of Focus Topic as the parent post type. You can think of the Log a Work Session RFG as the child post type, because RFGs are handled like child post types in Forms.

You already have a Form that creates the parent post. It is here:
hidden link

You also need a Create Post Form that is configured to create the Log a Work Session RFG (the child post). I do not see a Form to Create Log a Work Session RFGs in your site yet, so you must create one. You can see some screenshots in the documentation for creating child posts here:
https://toolset.com/course-lesson/selecting-parent-posts-when-using-forms-to-create-child-items/

This Form will include a select field where the User can assign a parent Focus Topic post. The documentation explains how to preselect the one Focus Topic using a "Create Child Post Link" in the Focus Topic Content Template: https://toolset.com/course-lesson/selecting-parent-posts-when-using-forms-to-create-child-items/#creating-forms-when-a-parent-post-is-preselected

When this Form is submitted, one RFG entry will be created for the Focus Topic post selected in the Form. I can show you how to redirect the User back to the parent Focus Topic post, if you'd like. This option is not available in the Form redirect settings, so a custom code snippet is required.

So the next step for you is to go to Toolset > Post Forms and create a new Form. In the "Form type" field, choose "Add new content" and in the "Post type to create or edit" field, choose the Log a Work Session RFG. The Form fields for the RFG will be generated automatically.

Next you can create a new Page to display this new RFG Form. Insert the Form using a Form block and publish the Page.

So the recommended workflow is:
- User creates parent Focus Topic post with the existing Form at hidden link
- You can edit the Form and set it to "display the post" after the Form is submitted, and the User will be redirected to the Focus Topic post.
- From the Focus Topic post, User clicks the Create Child Post Link and is redirected to the page containing the RFG Form, with the Focus Topic they just created preselected in the parent post field.
- User submits RFG Form and an RFG is created for their Focus Topic.
- If you want to redirect the User back to the Focus Topic post, I can share that custom code snippet. Otherwise, you should choose a different redirect option in the RFG Form configurations.

The topic ‘[Closed] Repeater custom post field call in post form’ is closed to new replies.