Skip Navigation

[Resolved] Repeatable Fields Group

This support ticket is created 3 years, 10 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/Karachi (GMT+05:00)

Author
Posts
#1664099

Tell us what you are trying to do?

I am sorry but this site is not operating now.
Would someone please tell me how to connect a (CPT that contains a RFG) to a (Form to Edit the fields for that RFG)?

Is there any documentation that you are following?
https://toolset.com/course-lesson/creating-and-displaying-repeatable-field-groups/#displaying-repeatable-field-groups

Is there a similar example that we can see?
I could not find one.

The link above describes Blocks which I do not use as I am using Layouts.
I need a contextual example not a visual with Blocks.

+ What I have done so far +
I created a CPT named Events.
I created a Form for editing the CPT which is in it's own Layout and works fine.
It has a View which shows the titles of the RFG below.
I created a RFG which is related to Events.
I created a Form to Edit the RFG.
I created a Layout that holds the Form.

+ So now I have a CPT with related RFG and I want to Link it to the Layout containing the RFG editing Form.
I know how to create a View that shows the RFG title(s) but I don't know how to create a link to the RFG Form.
Thank you for any help!

#1664423

Waqar
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi,

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

The post form edit link for an individual RFG works the same way as the one for the single post. Through a post view, you'll just have to change the current post's scope from the "Event" post to the "Event RFG" post.

Consider this practical example, to understand the required components:

1. Suppose that I have a "Events" post type with an RFG "Event RFG".

2. I'll need a layout "Single Event - display" to show the single event post's content.

3. I'll also need a layout "Single Event RFG - edit" to show the edit form "Edit an event" to edit the single event post.

4. The Edit post link, in this case, will look like this:
( ref: https://toolset.com/documentation/programmer-reference/forms/cred-shortcodes/#toolset-edit-post-link )


[toolset-edit-post-link layout_slug='single-event-edit' target='self']Edit[/toolset-edit-post-link]

5. I'll also need a layout "Single Event RFG - edit" that will contain the edit form "Edit an event RFG" to edit an individual "Event RFG" post.

6. Next, I'll need a post view "View to show related Event RFG" to show "Event RFG" posts related to the current "Event" post.

7. Inside this view's loop, the edit post link can be added the same way as in step 4, but with a changed layout slug:


[toolset-edit-post-link layout_slug='single-event-rfg-edit' target='self']Edit[/toolset-edit-post-link]

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

regards,
Waqar

#1665375

Dear Waqar,
Thank you so very much. Your expertise has solved my problem!
As a non-programmer I don't understand how to put all the pieces together as you did.
Please, I have a related question; Is there an advantage to using a Content Template within a View?
One of the fields for Events is a Map location, is there a cache advantage?
Thankfully,
Kelly

#1665649

Very sorry but I have another request.
When creating a link to add a RFG to the CPT, is there a way to link to a Form if it is in a Layout?
I found how to create a link to a Page containing the Form but not a Layout.
Waqar is it possible?
Thank you for sharing your knowledge!

#1666795

Waqar
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi Kelly,

Thanks for the update and glad that my message helped.

> Please, I have a related question; Is there an advantage to using a Content Template within a View?
> One of the fields for Events is a Map location, is there a cache advantage?

- There is no cache advantage involved, but using a content template helps because:

1. The same content template can be reused for multiple views if the loop item content that needs to be displayed is the same.

2. In the case of long or complex content for a loop item, it is easier to manage in its own content template section, rather than having it inside the "Loop Editor" section, with the rest of the loop code.

3. The content that is generated through a content template can be processed through the "the_content" filter ( ref: https://developer.wordpress.org/reference/hooks/the_content/ ), which is not possible if it is coming directly from the "Loop Editor".
https://toolset.com/documentation/programmer-reference/views/views-shortcodes/#wpv-post-body

> When creating a link to add a RFG to the CPT, is there a way to link to a Form if it is in a Layout?
> I found how to create a link to a Page containing the Form but not a Layout.

- If I understand correctly, you mean showing content from a Layout when it is not assigned to any page.

If that is correct, you can pass on the target layout's ID in a URL attribute "layout_id" and the page will be rendered using that target layout and not the usual/assigned layout.

For example, suppose your "Test page" ( yourwebsite.com/test-page/ ) is set to show content using a layout "Layout A" (ID: 123) and on some instances, you'd like the same page to show content from a different and unassigned layout "Layout B" (ID: 456).

For those instances, you can load the same page's URL with "layout_id" parameter:

yourwebsite.com/test-page/?layout_id=456 ( will show content using unassigned "Layout B" )

yourwebsite.com/test-page/ (will show content using regular/assigned "Layout A" )

Note: if you had something different in mind, please share more specific details with an example and I'll suggest something accordingly.

regards,
Waqar

#1667021

Thank you Waqar for your quick reply.
Sorry my explanation was not quite clear.
Actually I want to link to a Form to add an RFG to the CPT called Event.
I put the Form into a Layout so need a link to the Layout to show the Form.
I am using the Layout to hold the Form for adding the RFG.
I followed your step 4. above but it only describes links to a 'Page' holding the Form not a 'Layout'.
I tried different variations but had no luck creating the link.
When creating the View to hold the link, in the View Editor, I went to 'Toolset Forms', 'Other Toolset Forms actions', then 'Create Child Post Link', which only sets up a link to a 'Page' holding the "add RFG Form".
Thank you!

#1668295

Waqar
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi Kelly,

Thank you for sharing these details and sorry about the delay in getting back on this.

I feel I'll be in a better position to guide you, once I've seen the involved elements in the back-end.

Can you please share temporary admin login details in reply to this message?

Note: Your next reply will be private and please make a complete backup copy, before sharing the access details.

regards,
Waqar

#1669831

I learned enough in this thread to answer my own question. Thank you!

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.