Answers.Body: <p>Yes, you can pass in a variable into the parameters and to get the query string values use <code>craft.request.getQuery()</code>.</p>
  
  <p>I can recommend this blog post by Jérôme Coupé for a great introduction to setting up the form and the criteria model filters:</p>
  
  <p><a href="http://webstoemp.com/blog/combined-searches-and-filters-craft-cms/" rel="nofollow">Combined searches and filters using Craft</a></p>
  
  <p>You should also have a look at other questions tagged with "form".</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-03-10T01:08:28.667Z
Answers.LastActivityDate: 2016-03-10T01:28:26.800Z
Answers.LastEditDate: 2016-03-10T01:28:26.800Z
Answers.UserDisplayName: carlcs
Body: <p>Is there a way to set parameters from front-end user input?</p>
  
  <p>Let's say I have a page that displays a list of entries. On that page, I have a form select called <code>paidStatus</code> with options <code>notReceived</code>, <code>received</code>, and <code>paid</code>; and another form select called <code>order</code> with options <code>asc</code> and <code>desc</code>.</p>
  
  <p>Then, in my template code, I want to grab the list of entries:</p>
  
  <p><code>{% for entry in craft.entries.section('sectionName').order('postDate post.order').find() if entry.paidStatus == post.paidStatus %}</code></p>
  
  <p>with <code>order</code> and <code>entryStatus</code> being populated from the submitted form selects. That way I can change the criteria used to generate the list of entries on the fly.</p>
  
Tags: <entries><form><ordering>
Title: Set Parameters from User Input
ThreadText: # Set Parameters from User Input
  
  (Asked by: username_0 on 2016-03-09)
  
  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.
  
  **Tags:** entries, form, ordering
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2016-03-10. Score: 1
  
  Yes, you can pass in a variable into the parameters and to get the query string values use `craft.request.getQuery()`.
  
  I can recommend this blog post by Jérôme Coupé for a great introduction to setting up the form and the criteria model filters:
  
  [Combined searches and filters using Craft](http://webstoemp.com/blog/combined-searches-and-filters-craft-cms/)
  
  You should also have a look at other questions tagged with "form".
  
  
  ---
  
  