Skip Navigation

[Resolved] Best way to handle repeating fields / child posts

This support ticket is created 5 years, 7 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)

This topic contains 4 replies, has 2 voices.

Last updated by marcialB 5 years, 6 months ago.

Assisted by: Waqar.

Author
Posts
#1115766

Hi there

We are building a platform where users can create a simple styleguide. They can upload multiple variations of their logo (colored, black/white), some sample images for brand content, upload their fonts and define the colors used.

The users should be able to create their styleguides from the frontend (with CRED).

Now to my question: what is the best approach to allow users to create multiple instances of a certain type of content (e.g. logo)?

At first I thought, repeating fields are the way to go. But now I'm not sure anymore. Repeating fields seem fiddly. With child posts and relationships I think we can create a more polished user experience. Am I right or do I miss something?

I hoped it would be possible to create a styleguide with only one form. But maybe we have to split the creation into several steps, e.g. first the logos, then the colors, and so on. What do you think?

I hope you see what we want to achieve and can give us some insights.

Best,
Marcial

#1116987

Waqar
Supporter

Languages: English (English )

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

Hi Marcial,

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

Based on the requirements you've shared, you can use the CRED plugin form to collect style guide information from your users, in two ways:

1. You can use a repeating field group to collect a set of fields from users, where each field group entry will have the information of logo variations.
( ref: https://toolset.com/documentation/getting-started-with-toolset/creating-and-displaying-repeatable-field-groups/front-end-forms-for-repeatable-field-groups/ )

OR

2. You can use a fixed number (e.g. 2,3,4,5 etc) of regular and predefined fields to collect information in a single form. e.g.

Image file for variant 1:
Color code for variant 1:

Image file for variant 2:
Color code for variant 2:
… and so on

If your preference would be to collect all the information through a single form and would also like to make this information editable in the future (by users), option 2 is the way to go.

I hope this helps! Please let us know if you need any further assistance.

Thanks,
Waqar

#1126240

Hi Waqar

Thanks for sharing your thoughts. What do you think about using child posts? If I split up the creation into multiple steps, this seems to be a valid option as well. In a first step the user creates a style guide. Then he has multiple forms to add logos, colors and so on and they all display on the parent styleguide page.

This even brings the advantage, that you can work on your style guide over time without having to complete the form at once.

Best,
Marcial

#1127485

Waqar
Supporter

Languages: English (English )

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

Hi Marcial,

Thanks for writing back.

If you're leaning towards the idea of a multiple steps data submission, then the parent-post relationship is the way to go.

For clarity and clutter-free experience, you can split the child steps (logos, colors etc) into custom post types of their own and then assign them as a child in the one-to-many or one-to-one relationship (as required) with a parent post type "styleguide ".

We have a guide on the topic of post relationships at:
https://toolset.com/documentation/post-relationships/

Hope this guide will make it more clear. For any new questions, you're welcome to open a new ticket.

regards,
Waqar

#1127594

Hi Waqar

Thank you for your reply. That supports my decision. I think splitting the process up is the right call in this case.

Best,
Marcial

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