Navigation überspringen

[Gelöst] Repeatable Groups in Frontend Form

This support ticket is created vor 3 Jahren, 1 Monat. 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: Africa/Casablanca (GMT+01:00)

Dieses Thema enthält 1 Antwort, hat 2 Stimmen.

Zuletzt aktualisiert von Jamal vor 3 Jahren, 1 Monat.

Assistiert von: Jamal.

Author
Artikel
#2231423

Tell us what you are trying to do?
I have a pretty long Field Group (for cpt Methods on the site) in wich I am using 10+ repeatable field groups, I want users to be able to add and edit the posts of this cpt in the Frontend. Creating the form all the repeatable field groups are separate, wich I understand because rfg act as a child post. I thought of breaking the whole form apart into multiple forms and add them on one page one after the other. But then I would have end seemingly endless amount of submit buttons wich isn't pretty either. For each repeatable field group I would also need to select the Post it belongs to, so I thought I would make a create form in wich only the Title is added, and then an edit form in wich all the different parts are inserted, and then it might be possible to select the the post just created in all the rfg. But it seems quite an act to me with a mediocre outcome. Is there a more elegant way of using rfg on the frontend?

Is there any documentation that you are following?
No
Is there a similar example that we can see?
No
What is the link to your site?
versteckter Link

#2231781

Hello and thank you for contacting the Toolset support.

I am afraid there is no easy or built-in solution for this case. Splitting the post into multiple forms will generate submit buttons per form and fields to choose the parent post. Maybe it can be worked around using some CSS styles to hide the duplicated fields and submit buttons, and trigger the hidden submit buttons using Javascript.

Or maybe you can use a tabs based solution and put a form on each tab. versteckter Link

You may also consider splitting the forms into multiple pages, and use a combination of redirections and URL parameters to create some sort of forms wizard to take the user through all the forms. Based on the URL parameter you can show/hide respective forms and pass the parent post's ID on the URL too. https://toolset.com/documentation/programmer-reference/cred-api/#cred_success_redirect

I hope this helps. Let me know if you have any questions.