Answers.Body: <p>According to <a href="http://buildwithcraft.com/docs/searching#supported-syntaxes" rel="nofollow">this page</a>, this is how it's done:</p>
  
  <pre><code>{% set entries = craft.entries.search('interest:interestSearchValue destination:destinationSearchValue) %}
  </code></pre>
  
  <p>So, using the posted variables:</p>
  
  <pre><code>{% set entries = craft.entries.search('interest:' ~ craft.request.param('interest') ~ ' destination:' ~ craft.request.param('destination')) %}
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-08-03T15:18:58.223Z
Answers.Text: Thanks Paul.
  
  This certainly helped - although it appears you don't need the AND in there, a space will suffice.
  
  Search is not working as expected, thanks again for your help.
Answers.UserDisplayName: toffeejay
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-08-03T15:29:12.130Z
Answers.Text: *Search is now working (correction from above).
Answers.UserDisplayName: toffeejay
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-08-03T15:31:11.743Z
Answers.Text: Ah, no AND. That WAS an assumption, based on the OR I saw ...
Answers.UserDisplayName: Paul
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-08-03T14:50:15.477Z
Answers.LastActivityDate: 2015-08-03T17:10:26.090Z
Answers.LastEditDate: 2015-08-03T17:10:26.090Z
Answers.UserDisplayName: Paul
Body: <p>I have a form that consists of two dropdown boxes. These dropdowns contain values that relate to two sets of categories for one type of entry.</p>
  
  <p>So when the search form is submitted there are two params that are passed, an interest and a destination.</p>
  
  <p>The result I need, if I were to write it literally would be:</p>
  
  <p>Select all the courses where INTEREST = [interest] <strong>AND</strong> DESTINATION = [destination]</p>
  
  <p>Having a hard time figuring out how this is done in Craft.</p>
  
  <p>Any help appreciated. </p>
  
Tags: <entries><search>
Title: Search entries based on two form values
ThreadText: # Search entries based on two form values
  
  (Asked by: username_0 on 2015-08-03)
  
  I have a form that consists of two dropdown boxes. These dropdowns contain values that relate to two sets of categories for one type of entry.
  
  So when the search form is submitted there are two params that are passed, an interest and a destination.
  
  The result I need, if I were to write it literally would be:
  
  Select all the courses where INTEREST = [interest] **AND** DESTINATION = [destination]
  
  Having a hard time figuring out how this is done in Craft.
  
  Any help appreciated.
  
  **Tags:** entries, search
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2015-08-03. Score: 2 | Accepted answer
  
  According to [this page](http://buildwithcraft.com/docs/searching#supported-syntaxes), this is how it's done:
  
  ```
  {% set entries = craft.entries.search('interest:interestSearchValue destination:destinationSearchValue) %}
  
  ```
  
  So, using the posted variables:
  
  ```
  {% set entries = craft.entries.search('interest:' ~ craft.request.param('interest') ~ ' destination:' ~ craft.request.param('destination')) %}
  
  ```
  
  > **Comments:**
  > **username_0**: Thanks username_1.  This certainly helped - although it appears you don't need the AND in there, a space will suffice.  Search is not working as expected, thanks again for your help.  
  > **username_0**: *Search is now working (correction from above).  
  > **username_1**: Ah, no AND. That WAS an assumption, based on the OR I saw ...  
  
  ---
  
  