Hello,
I use several solutions on this page
- CMS Filter
- CMS Sort
- CMS Combine
- CMS Pagination
Everything seems to work like a charm, except the sorting.
Any idea what’s causing the problem?
The project link is here: https://preview.webflow.com/preview/seyna-ouiflow?utm_medium=preview_link&utm_source=designer&utm_content=seyna-ouiflow&preview=307c26eda3c4703d4a3630d2c4e4c9ba&pageId=653bdbfac1d2b7e5c6315697&workflow=preview
Thanks for your help
Hey @Fabien_ouiflow! Can we switch the select element to a button and then add this code to the </body>
?
<script>
window.fsAttributes = window.fsAttributes || [];
window.fsAttributes.push([
'cmsload',
(listInstances) => {
console.log('cmsload Successfully loaded!');
document.querySelector('.your-trigger-button-class').click();
},
]);
</script>
Hi Luis,
I used this script and replaced the select by a button but I still can’t figure out where is the problem 
If you have any idea 
Hey @Fabien_ouiflow! On my end, it is sorting the list from oldest to newest post. Is this not the desired behavior?
You can add the setting below to the trigger to sort the list from newer to older.
If the issue is not this please share a video explaining what is wrong 
Hi @Support-Luis ,
I found something in the date format :
If I use a format with numbers (e.g. 6/11/2023) the sorting is done on the first digit of the string, then the 2nd and so on.
This makes the filter inconsistent:
If I switch to an alphabetical format (e.g. Nov 6, 2023), the sorting is performed as desired :
The only problem is that the date format doesn’t correspond to the European format, but we could certainly add a script to change this (but we’ll have to check that it works with the attributes).
Thanks for your help
Do let me know if you need any help to implement the script! You can take a look at the Attributes API for more info on how to add code after any solution has executed.
1 Like