<script src="https://cdn.flexmonster.com/flexmonster.js"></script>
<div>
<h2>How to apply filters to several fields at once</h2>
<p>
To filter several fields at once, call the
<a href="https://www.flexmonster.com/api/setfilter/" target="_blank"
>setFilter</a> method successively with each field as a parameter.
</p>
<p>
In this example, when you click the button to set a filter, the
<code>setFilter</code> method is called two times: with the
<code>Category</code> field as a parameter and with the
<code>Country</code> field.
</p>
</div>
<button onclick="setFilters()">Set a filter for two fields</button>
<button onclick="clearFilters()">Clear the filter</button>
<div id="pivot-container"></div>