Skip Navigation

[Resolved] Drag and drop field order for repeating field group not saved

This thread is resolved. Here is a description of the problem and solution.

Problem:
How to display repeatable field groups on the front end as the same order they are shown in the back-end post editor, where the order can be changed with drag 'n drop.

Solution:
You output the repeatable field groups on the front end using a View, where you can specify the sort order based upon the field "toolset-post-sortorder".

It's important this is ordered using the field value as a number, not as a string.

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

Our next available supporter will start replying to tickets in about 2.34 hours from now. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+00:00)

Tagged: 

This topic contains 2 replies, has 2 voices.

Last updated by andrewF-6 5 years, 5 months ago.

Assisted by: Nigel.

Author
Posts
#1263559

I am trying to:
Have the order of my repeating field groups be displayed in the view. I drag and drop the RFGs and order is not saved. I even set the view Ordering to “Field - toolset-post-sortorder” and whilst the fields reorder, they do not reorder in the exact way as displayed on the back end.

Link to a page where the issue can be seen:
hidden link

I expected to see:
My view ordering the results in the order of the RFG

Instead, I got:
A non-random unrelated field order

I have researched the following support topics:
https://toolset.com/forums/topic/displaying-post-order-in-loop-view/
https://toolset.com/forums/topic/drag-and-drop-field-order-for-repeating-field-group-not-saved-2/
https://toolset.com/forums/topic/drag-and-drop-field-order-for-repeating-field-group-not-saved/

#1263685

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Hi Andrew

I've looked at your site and the sample post.

The ordering is not correct because in the View to display the Recent Credits field group items for the sort order you are sorting as a string, but the sort order is stored as a number, and sorting numbers as strings will give the wrong results.

I changed the setting to sort as a number and it appears to work correctly on the front end now.

#1263799

My issue is resolved now. Thank you! So easy! Thanks so much Nigel for the guidance!