We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Search for multiple custom fields

How Do I?

alessandro1992ma's avatar
alessandro1992ma
1 posts
6 years ago
alessandro1992ma's avatar alessandro1992ma

Hello everyone (Merry Christmas), I’m just using EE to create a small website. I can not understand how I can make filters for custom channel fields.

I have a channel “Properties” with fields {id_immobile} type Number, {common} type String, {contract} type String and {type} type String. All have the Include check mark in the search.

I created a Form inspired by that in the documentation but I do not think is correct.

{exp:search:advanced_form channel="immobili" result_page="immobili/search"}
 <!--<input type="hidden" name="search_in" value="entries"/>-->
    <input type="hidden" name="where" value="word"/>
 <div class="form-group">
     <select class="form-control" name="keywords">
   <option selected disabled>Seleziona Contratto</option>
            <option value="Vendita">Vendita</option>
      <option value="Affitto">Affitto</option>          
     </select>
   </div>
 <div class="form-group">
     <select class="form-control" name="">
   <option selected disabled>Seleziona un Comune</option>
            {exp:channel:entries channel="comuni"}
      <option value="{title}">{title}</option>
   {/exp:channel:entries}            
     </select>
   </div>
        <div class='searchSubmit'>
                <input type='submit' value='Search' class='submit' />
        </div>

{/exp:search:advanced_form}

I would like the research to work based on choices.

I want to create a search filter for the first Select OR second Select OR third Select.

Example: I select only Contract-> Sale of the first Select, it must find all the Properties that have the custom field named {Contract}. Selecting Sale of the first select and an option of the second Select (Exp. Contract-> Italy), must find all the Properties that have the custom field named {Contract} and custom field named {Municipality}

I hope I have made my problem better understand this way.

Thanks in advance

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.