Skip Navigation

[Resolved] Adding repeating fields to a CRED form for frontend submissions

This support ticket is created 6 years, 4 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/Hong_Kong (GMT+08:00)

This topic contains 3 replies, has 2 voices.

Last updated by Luo Yang 6 years, 4 months ago.

Assisted by: Luo Yang.

Author
Posts
#1131481

Tell us what you are trying to do?
Hi Toolset Support,

I am trying to add repeating custom field groups into a CRED for that will be used for frontend "EVENT" submission. Currently, there doesn't seem to be any obvious way to do this. Ultimately, this form will be a "Pay To Submit" form.

The documentation I have been following:
https://toolset.com/documentation/getting-started-with-toolset/creating-and-displaying-repeatable-field-groups/front-end-forms-for-repeatable-field-groups/
https://toolset.com/documentation/getting-started-with-toolset/publish-content-from-the-front-end/forms-for-editing/?utm_source=formsplugin&utm_campaign=forms&utm_medium=forms-gui&utm_term=forms-editing-doc
https://toolset.com/forums/topic/cred-repeating-field-groups/
https://toolset.com/forums/topic/current-user-posts-in-child-posts/#post-581569
https://toolset.com/forums/topic/cred-repeating-groups-not-working/

Is there a similar example that we can see?
No, but here is what I expected...
Create a CRED form for my CPT. Add fields related to the CPT (mostly done via the auto-generate fields option), Insert product element for payment processing, Save & Publish form, Insert form into the relevant page via shortcode / VIEWS gui.

What I have discovered:
The only way to add Repeating Field Groups to my CRED form is by creating individual CRED forms for each repeating field group. (In My Case 3 groups)
Then, the only way to merge these CRED forms is to Submit 1 form and re-direct to another until I get to the last form.
Given that I want to include a "Pay to Post" per event feature, this workflow is not ideal.

So, what workarounds exist for this issue???

Before answering could we consider something like the following:

1. Create the main CRED form
2. Create "child" CRED forms (Representing Repeating Field Groups)
3. Insert child forms into Main CRED form via Embeds or use of modal windows triggered by buttons to display child form input fields (modal window might be easier here as users can do that themselves already with help from the documentation)
4. Add a function that temporarily saves all forms to create a post-relationship between parent & child forms
5. Click "Save Post Form"
6. Embed main CRED form in page / post or wherever
The rendered result is 1 form with all the main CRED form fields as created from the "Auto-Generate Fields" and a series of modal window buttons linking to child CRED forms.

For all intent and purpose, the end user is presented with what appears to be 1 form, 1 set of payment details and a submit button.

I am open to any suggestions or better ways to achieve a "seamless" result for the end user.

Many thanks

Nick

What is the link to your site?
hidden link

#1131868

Dear Nick,

Toolset Repeating Field Groups are based on one-to-many post type relationship, so each item of Repeating Field Group is a individual post, but one post form can only handle one post in the same time, it can not create the post + items of Repeating Field Group at only one form.

And form within form is not support by HTML, so your workaround won't work too.
https://stackoverflow.com/questions/555928/is-it-valid-to-have-a-html-form-inside-another-html-form

And our developers are already aware of these, it is under development, so you are right, currently, the only workaround is by creating individual CRED forms for each repeating field group.
See our document:
https://toolset.com/documentation/getting-started-with-toolset/creating-and-displaying-repeatable-field-groups/front-end-forms-for-repeatable-field-groups/

#1132212

Hi Luo,

This is all very frustrating. I appreciate you guys are working very hard on many aspects of Toolset. It's just infuriating that the potential is there but the ability to follow through keeps falling short.

Just on the off chance, is there any non-official way around this problem? I have been through the forum and know the standard response is not to support custom coding but there must be someone out there your team knows of who has been able to get repeating fields working on forms? Even if that means mimicking how the backend functions with a "Must Save Post First" message and a save button.

If not, it's just one other thing I have to remove from the site because the promise of toolset as a tool didn't quite meet it's real-world capabilities.

Forgive my negativity here Luo. I am not one to moan typically but I've been at this for 3 months and finding solutions to what seem like intuitive things has been like pulling teeth.

Not to complain and run, I would prefer to be apart of the solution as opposed to the problem. May I offer my service / support to improve this product. If you would like, we can open a discussion privately. If you guys are open to help, you can reach out to me at nickbetsy@gmail.com

Thanks

Nick

#1132499

Dear Nick,

You are right, it needs custom codes, and I don't think there is a easy way to achieve it, according to our support policy, we don't provide custom codes support:
https://toolset.com/toolset-support-policy/

So in your case, I suggest you check it with our Toolset contractors:
https://toolset.com/contractors/
The Contractors are experienced WordPress and Toolset developers who are ready to help you with everything from building complete sites to developing custom components