Sorting Forms by date order

Hello,

In the Gravity Forms dashboard within WordPress, forms can be sorted by such characteristics as Status, Title (alphabetical), ID and more.

We run events and use Gravity Forms to collect registrations for these events. Is it possible to sort these forms in the dashboard by the date of the event? I imagine this might require some custom functionality since it’s not a native sort option, but if it’s possible to implement that would be great.

Thanks,
Cian

Where are you storing the date of the event? Is it in the form title? or do you just want to sort by the date the form was created?

The date of the event is not being stored on the form itself right now. The forms are included in pages which themselves state the date of the event. I imagine the date of the event needs to be stored in the form itself?

Ideally, rather than the dates being in the form title, it would be stored within the form itself somewhere such that it can then be used to sort by in the Gravity Forms dashboard. If it’s the case that dates need to be stored in the title then fair enough, but was just wondering whether what I described earlier is possible.

Here’s a plugin that will get you so close.

The one thing missing? A filter to specify which columns of the Form List table are sortable. I explain in more detail and demo the plugin in this video.

Ah this looks quite useful - thanks for this! So Gravity Forms doesn’t have the hooks that allows for sorting by event date, hence the hard-code solution? And also, when inputting the event date on each form does the format need to be yyyy-mm-dd, or could we use the dd-mm-yyyy format (the one we tend to work with)?

Many thanks,

1 Like

So Gravity Forms doesn’t have the hooks that allows for sorting by event date

Correct. And I wouldn’t recommend relying on a hardcoded solution. Instead I’d reach out to the GF team about getting this hook added.

does the format need to be yyyy-mm-dd, or could we use the dd-mm-yyyy format (the one we tend to work with)?

Good question. I didn’t actually check, I just know that YYYY-MM-DD format is typically the easiest for databases to work with.

Okay that’s all fair. Thanks for this regardless - it’s probably something we will flag to the GF team, but for now this seems like a good workaround. Will get it tested for certain.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.