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...
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
Thank you, that's work 🙂
Now, in the page with repeatable view, how can i filter by an field of his parents?
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/
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?
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.
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"
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.