Crocoblock / suggestions

The suggestions for CrocoBlock project
195 stars 78 forks source link

Dynamic accordion/tabs based on repeater fields using Dynamic Data Addon #4272

Open antoinelbch opened 2 years ago

antoinelbch commented 2 years ago

Would really appreciate the ability to have a dynamic number of accordion fields or tabs generate based on the number of repeater fields with data.

Related plugins:

When combining these with repeater fields it is possible to:

It is not possible to:

Official support of this functionality would be an ideal solution.

Use case example:

Tour pages - Tours have varying durations from single day to 12+ days. Would like to style day-to-day itinerary in an accordion format using data from repeater fields in JetEngine for a 'Tours' custom post type.

Repeater Field 1 - Day Number (Day #) i.e. Day 1 Repeater Field 2 - Day Description (Long Itinerary Description text field)

A 3-day tour would dynamically show 3 tabs with the day number as the tab title and the body content being the description for each day, a 5-day tour would dynamically show 5 tabs and so on...

Also see: Issue 1119

Examples: Post template with tabs + dynamic data Visual example

jh4tz commented 2 years ago

To add to this, this will enable simple FAQ style repeaters to be rendered inside the dynamic accordion widget for each post inside a Post Type. For an example use case, site admins want to add different FAQs for each Product in their store easily. At the moment I am stuck with using a meta a box with N number of FAQs that fill an accordion with N items. If a site admin wants to add any other number of FAQs then my whole product template with an accordion element falls apart.

Of course I could just use static text fields and the dynamic repeater widget but it's obviously not the same.

If I am thinking of this the wrong way or if there's another way to do this, then please let me know! As far as I'm aware, ACF pro does this comfortably.

ajithewebstock commented 2 years ago

+1

hschk commented 2 years ago

+1

IslamSultan commented 1 year ago

+1

angelmgl commented 7 months ago

We need this feature