Loading...
 
Features / Usability

Features / Usability


How to sort results (dates) from a dynamic tracker field in smarty

posts: 126886 United Kingdom

Hi B

I think you'll need to use the PHP sort function https://www.php.net/sort

You'll need to add it as an allowed php function in the security control panel, and the use it something like (totally untested)

Hmm, but you'll need to turn the string into an array first... try

Copy to clipboard
{$dates = '<br>'|explode:$orderrow.holydaysDays} {$sort($dates)} {'<br>'|implode:$dates}


However... you will also have to change the date format so it sorts correctly, to YYYY-MM-DD - hmm, must be a better way eek

There are no comments at this time.