Skip Navigation

[Resolved] Repeat field

This support ticket is created 2 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 7 replies, has 2 voices.

Last updated by Waqar 2 years, 7 months ago.

Assisted by: Waqar.

Author
Posts
#2173503

I'm looking for an easy way to add dates to training records. It is displayed as a list in the training sheet but also in another page, with a view that would display the list of dates, sorted in chronological order.

Page Fiche VUE : Formation A :
12/10/21
13/10/21
20/10/21

Page Fiche VUE : Formation B :
14/10/21
15/10/21

Page Agenda VUE
12/10/21 : Formation A
13/10/21 : Formation A
14/10/21 : Formation B
15/10/21 : Formation B
20/10/21 : Formation A

I am unable to display the agenda view by repeating the dates available for each training. On the other hand, I manage to display the list of training courses with the dates

I have test repetable field...

#2173659

Waqar
Supporter

Languages: English (English )

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

Hi,

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

The repeatable custom fields are stored in the order that they are added and there is no built-in feature to show them ordered by a certain criteria.

For what you're planning, it would be better to use a repeatable field group, instead of a repeating field.

For your post type "Training Records", you can a new repeatable field group named "Training Date Entries".
( ref: https://toolset.com/lesson-placement/lesson-placements-1620889-1620037/#making-groups-of-fields-repeatable )

In this repeating field group, you can add a date type field "Training Dates", which will allow you to store one date, in each "Training Date Entry".

On the front-end, you can use the post views to show these dates for each "Training Record" post, ordered by the date field.

I hope this helps and please let me know if you need any further assistance around this.

regards,
Waqar

#2174101

Thank you, that's work 🙂
Now, in the page with repeatable view, how can i filter by an field of his parents?

#2174891

Waqar
Supporter

Languages: English (English )

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

Thanks for the update and glad that it worked.

To show the list of all the "Training Dates" on one page, you can create a new post view using the classic views editor. It is not possible to create a standalone view for repeating field group posts, using the blocks editor.

Please go to WP Admin -> Toolset -> Settings -> General and make sure that the option "Show both the legacy and Blocks interface and let me choose which to use for each item I build" is selected for the editing experience.

Next, you can go to WP Admin -> Views -> Add New to create a new view for the "Training Date Entries" (the new post type for the repeating field group).

In the view's settings, you can set the order settings to show the results based on the "Training Dates" field, and in the "Search and Pagination" section, including a new filter to show the results from a selected parent "Training Records" post.

You'll find detailed guides on using the classic views editor, in this guide:
https://toolset.com/documentation/legacy-features/views-plugin/

#2177229

I'm a little confused, I don't quite understand.
What is a "post view"? Is a "view" simply?
And in view, how use block editor?

#2178429

Waqar
Supporter

Languages: English (English )

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

Thanks for writing back.

> What is a "post view"? Is a "view" simply?

- Yes, from post view, I simply meant the view that shows posts.

> And in view, how use block editor?

- As explained in my previous reply, a view created using the blocks editor, can't show all the repeatable field group entries/posts, which is why for this particular requirement, you'll need to use the classic editor for views.

If you face any difficulty in working with the classic view, you're welcome to share the details of what you've already tried and what is missing.

#2178613
explication01.jpg
Capture-d’écran-2021-09-24-à-16.45.31.jpg
Capture-d’écran-2021-09-24-à-16.46.06.jpg
Capture-d’écran-2021-09-24-à-16.45.18.jpg

As an attachment, I took a screenshot of the displayed result (example.jpg) and the configuration of my view
What I'm trying to do is add a search field (filter) above the list, which would allow me to filter on a "taxonomy" field of the post type "training"

My view is done as you explained to me, it works, I have the list, but I cannot use the main post category "training" to filter . Taxonomy "category" is a field of the post type "formation"

#2179901

Waqar
Supporter

Languages: English (English )

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

Thank you for sharing these details.

From your message, I understand that the taxonomy "category" is attached to the parent post type "formation", but the created view is set to show the child repeating field group posts.

The search filters only work for the fields and taxonomies directly attached to the post type that is being shown through the view.

This means that you can use the search filter for the taxonomy "category" when working with a view to show the "formation" post type, but not in the view for the repeating field group posts.

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