Hi,
I'm trying to do multiple filters can't for the life of me get it to work. Can someone with a fresh set of eyes take a look for me?
filter form
PHP
- <!-- START SECTION SEARCH AREA -->
- <section class="main-search-field" style="background-image: url('images/search-bg.jpg'); background-position: center center">
- <div class="container">
- <perch:form id="search" method="get"><div class="col-md-10" style="padding: 0"><div class="row">
- <perch:input type="search" id="q" class="at-input" name="min-area" placeholder="Enter location or postcode">
- </div>
- </div>
- <div class="row">
- <div class="col-lg-3 col-md-3" style="padding: 0">
- <div class="at-col-default-mar styled-select blue">
- <perch:input id="property" type="select" label="Property Type" options="Property Type|,Detached, Semi-Detached, Terrace, End Terrace, Link, Maisonette, Bungalow, Studio, Flat/Apartment, House in Multiple Occupation" required class="div-toggle"/>
- </div>
- </div>
- <div class="col-lg-2 col-md-2" style="padding: 0">
- <div class="at-col-default-mar styled-select blue">
- <perch:input id="minimum" type="select" label="Property Type" options="Minimum Price|,60, 70, 80, 90, 100, 200" required class="div-toggle"/>
- </div>
- </div>
- <div class="col-lg-2 col-md-2" style="padding: 0">
- <div class="at-col-default-mar">
- <div class="at-col-default-mar styled-select blue">
- <perch:input id="maximum" type="select" label="Property Type" options="Maximum Price|,600, 700, 800, 900, 1000, 2000" required class="div-toggle"/>
- </div>
- </div>
- </div>
- <div class="col-lg-3 col-md-3" style="padding: 0">
- <div class="at-col-default-mar styled-select blue">
- <perch:input id="bedrooms" type="select" label="Property Type" options="Minimum bedrooms|, 1 Bedroom|1, 2 Bedrooms|2, 3 Bedrooms|3, 4 Bedrooms|4, 5 Bedrooms|5, 6 Bedrooms|6, 7 Bedrooms|7, 8 Bedrooms|8, 9 Bedrooms|9, 10+ Bedrooms|10" required class="div-toggle"/>
- </div>
- </div>
- <div class="col-lg-2 col-md-2" style="padding: 0">
- <div class="at-col-default-mar no-mb">
- <perch:input type="submit" value="Search" class="btn btn-secondary hvr-bounce-to-right" type="submit">
- </div></div></perch:form>
- <?php
- perch_content_custom('Properties to Let',[
- 'template' => 'lettings_listing.html',
- 'count' => 10,
- 'paginate' => true,
- 'page'=> '/lettings.php',
- 'filter' => [
- ['filter' => 'propertyBedrooms',
- 'match' => 'eq',
- 'value' => perch_get('bedrooms')
- ],
- ['filter' => 'propertyType',
- 'match' => 'eq',
- 'value' => perch_get('property')
- ],
- ['filter' => 'propertyPrice',
- 'match' => 'eqbetween',
- 'value' => perch_get('minimum') . ', ' . perch_get('maximum'),
- ],
- ],
- ]);
- ?>