Skip Navigation

[Resolved] Link to Edit RFG and Nested RFG from View Listing of All Custom Posts

This support ticket is created 5 years, 5 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
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

Author
Posts
#1271039
Manage CVs Edit RFG and Nested RFG.png

Tell us what you are trying to do?
I have made a summary view to list all of the Posts in a table. I would like to create a link to the edit forms for each CPT. From this list I would like to link to edit the main CPT, the first level RFG, and the Nested RFG.

This is the link to the page: hidden link
The edit links will not show until you are logged-in but I think you can get a sense of where the edit links are and what we are trying to do...

My understanding RFG and Nested RFG are essentially One to Many Child Posts.

Is there any documentation that you are following?
https://toolset.com/forums/topic/repeater-fields-groups-in-cred-working/
https://toolset.com/forums/topic/does-front-end-forms-for-repeatable-field-groups-work/
https://toolset.com/documentation/getting-started-with-toolset/creating-and-displaying-repeatable-field-groups/front-end-forms-for-repeatable-field-groups/
https://toolset.com/forums/topic/editing-repeatable-field-groups-on-the-front-end/

What is the link to your site?
hidden link

This is the per row code I am using in the view:

<td class="edit">[toolset-edit-post-link content_template_slug='create-edit-cvs' target='self'][icon name="edit"][/toolset-edit-post-link]</td>
<td><a href="[wpv-post-url]">[types field='surname'][/types]</a></td>
<td><a href="[wpv-post-url]">[types field='first-name'][/types]</a></td>
<td>[wpv-post-taxonomy type="crew-type"]</td>
<!--<td class="edit"><i class="far fa-edit">[cred_form form='edit-recent-credits']</i></td>-->
<td class="edit"><i class="far fa-edit">[wpv-post-body view_template="edit-recent-credits"]</i></td>
<td class="edit">[icon name="edit"]</td>
#1271073

Hi, let's start here:
https://toolset.com/documentation/getting-started-with-toolset/creating-and-displaying-repeatable-field-groups/front-end-forms-for-repeatable-field-groups/
"Currently, you cannot create Toolset forms for nested repeatable groups." This is a limitation I don't have a workaround for. It's simply not possible in the current system to use nested RFGs with Forms.

If looks like you have set up an edit post link for the main post. Is that working as expected?

#1271077

Hi Christian,

Yes the edit post link for the main post is indeed working.

Is it possible to create an edit post link for the RFG to correspond with the Main Post? That RFG is not nested....

Thanks,
A

#1271085

Yes, this process is mentioned in the documentation here: https://toolset.com/documentation/getting-started-with-toolset/creating-and-displaying-repeatable-field-groups/front-end-forms-for-repeatable-field-groups/#forms-for-editing-values-of-existing-repeatable-field-groups

Create a View that displays the RFG and add a post relationship/post owner filter, where the owner post is set by the current post in the loop (which will be the main post). Create your edit Form and insert it in a blank Content Template. Then you can insert an edit post link in the RFG View's loop. Nest the View of RFG inside the View of the main post. The structure you end up with will look something like this:

- Main Post 1 - RFG 1a
              - RFG 2a
              - RFG 3a
- Main Post 2 - RFG 1b
              - RFG 2b
              - RFG 3b
#1271149
Client-Side Hiding a field from the form.png
Hiding a field from the form.png

Dear Christian,

With your guidance I was able to get this to work. Now to confirm:
1. Is there a similar solution for the last column for editting Nested Repeating Field Groups? Is there any way to create a form for editing Nested Repeating Field Groups? Even one in which the user can select the associated field from a dropdown select field or something similar?
2. For the 2nd to Last Column of Repeating Field Group, if I delete the Field Name from the Form, is this effectively hiding it or removing the data on submission? The reason why I ask is because the Page Title and Field Name in the form are identical. The user should not be able to change this in the RFG form. I would like to delete or hide this field from the RFG form to prevent any potential errors. So if I delete the field, will it effectively be hiding the field or will it be deleting the field data from the database.

Thank-you for your continued assistance!

#1271671

Hi Support,

Just to reiterate I now have three forms. I am able to Create and Edit Form 1 and Form 2 using Toolset Forms. I would like to know if there is ANY WAY to Create or Edit Form 3, the Nested RFG using Toolset Forms.

Form 1 - Custom Post Type:
hidden link

Form 2 - RFG of the Custom Post Type:
hidden link

Form 3 - Nested RFG of the RFG above:
hidden link

I believe if I could pass the Custom Post Type Value and the RFG value to the form, then the creations and edits would hold.

If it is not possible, what is the Best Practice for having users populate their Nested RFGs within Types?

Thanks for your help thus far.

#1271735

1. Is there a similar solution for the last column for editting Nested Repeating Field Groups?
Nested RFGs are officially not supported in Forms, that's what the documentation says and what I've been told. If you try to implement something like this, you may get unexpected results.

2. For the 2nd to Last Column of Repeating Field Group, if I delete the Field Name from the Form, is this effectively hiding it or removing the data on submission?
I would use CSS to hide this field from the front-end, rather than delete the field from the Form entirely. That can cause problems with Form submission.

<div class="field-group" style="display:none !important;">
[cred_field...]
</div>
#1271885

I am reporting this message because I think it got pushed back in the sequence...

Hi Support,

Just to reiterate I now have three forms. I am able to Create and Edit Form 1 and Form 2 using Toolset Forms. I would like to know if there is ANY WAY to Create or Edit Form 3, the Nested RFG using Toolset Forms.

Form 1 - Custom Post Type:
hidden link

Form 2 - RFG of the Custom Post Type:
hidden link

Form 3 - Nested RFG of the RFG above:
hidden link

I believe if I could pass the Custom Post Type Value and the RFG value to the form, then the creations and edits would hold.

If it is not possible, what is the Best Practice for having users populate their Nested RFGs within Types?

Thanks for your help thus far.

#1271933

I believe if I could pass the Custom Post Type Value and the RFG value to the form, then the creations and edits would hold.
My answer remains the same, Forms for nested RFGs are not supported and I don't have any advice for you to implement them. I suggest you submit your request for nested RFG Form support here: https://toolset.com/home/contact-us/suggest-a-new-feature-for-toolset/

What is the best practice for letting users populated their nested RFGs?
The best practice for populating nested RFGs is to edit them in wp-admin by editing the post that contains the RFGs.

#1272997

HI there,

This code you suggested...

<div class="field-group" style="display:none !important;">
[cred_field...]
</div>

Where would I put this CSS code? Can you please help me with information that is a little bit more specific?

Thanks

#1273003

You'll have to switch to "Expert mode" in the Form builder. Then you'll be able to add HTML markup around the field you want to hide from View. I'm not sure there is an easy way to do that from the drag-and-drop builder.

#1273451

My issue is resolved now. Thank you!