Combine + Sort by button auto click only working once

I’m stuck with this and can’t find a working solution.

For some reason the auto button click to sort the combined CMS-list does only work once. I need this function to work every time the site loads because visitors can visit pages more than once.

The Combine+Sort feature needs to work on other pages too. But at the moment it’s only set up on the homepage. I’m open for different solutions.

My goal is to automatically sort combined lists alphabetically by “name”. I’m guessing that the code fires at the wrong moment or something like this. Timeout for the auto click didn’t work either.

Please help! This function is key for the website.

Here is the URL: Homepage

Here is the Webflow read only link:

Thank you so much!

hey @felix.schmidli95! You could try using the CMS Combine callback to ensure the script has finished combining the lists to then click the sort trigger.

You can replace the current click line with this snippet

  window.fsAttributes = window.fsAttributes || [];
    (listInstances) => {
      console.log('cmscombine Successfully loaded!');
1 Like

It works perfectly! You’re my hero Luis :smiley:

1 Like

You are welcome Felix! Glad to know it works! :muscle:

1 Like