ideas icon indicating copy to clipboard operation
ideas copied to clipboard

Form submissions are not sortable

Open forby opened this issue 4 years ago • 3 comments
trafficstars

Bug Description

When using the form:submissions tag the collection doesn't respond to any sorting parameters.

How to Reproduce

Add a sort parameter to a form:submissions tag:

{{ form:submissions in="contact" sort="name" }}
    ....
{{ /form:submissions }}

Extra Detail

image

Environment

Statamic 3.0.33 Solo Laravel 8.18.0 PHP 7.3.25 No addons installed

Statamic version: 3.0.33

PHP version: 7.3.25

Install method:

  • Fresh install from statamic/statamic

forby avatar Dec 08 '20 23:12 forby

Not a bug. It's not documented, it's just a feature that doesn't exist. I've moved this to the ideas repo.

In what situation do you need to sort form submissions?

jasonvarga avatar Feb 10 '21 20:02 jasonvarga

Ah, gotcha. I was trying to build a "guestbook" page for a client—like from the websites of old. Their design had submissions with newest on top but it wouldn't respond to any sorting. I guess the example above tries to sort by a field...but I believe had tried date as well. That's good to know! Thanks 🙏

forby avatar Feb 10 '21 20:02 forby

Any news on this? @jackmcdade

It would be super useful to be able to sort. We built a public guestbook for hike checkins with a shared form for all checkins.

If we could both sort and filter f.i. checkin:is="mount hood" sort="date:desc" it would open up all sorts of treats for the index (latest hikes) as well.

krokusmoen avatar Jun 26 '22 09:06 krokusmoen