Is there a way to set parameters from front-end user input?
Let's say I have a page that displays a list of entries. On that page, I have a form select called paidStatus
with options notReceived
, received
, and paid
; and another form select called order
with options asc
and desc
.
Then, in my template code, I want to grab the list of entries:
{% for entry in craft.entries.section('sectionName').order('postDate post.order').find() if entry.paidStatus == post.paidStatus %}
with order
and entryStatus
being populated from the submitted form selects. That way I can change the criteria used to generate the list of entries on the fly.