Problem: I have a conditional in my View output editor that tests the value of a search term / URL parameter using the [wpv-search-term] shortcode. When I update the View results using AJAX, the conditional stops working.
Solution: Add a hidden field in your filter controls that contains the value of the search term from a URL parameter. Add the 'js-wpv-filter-trigger' class to this input to send the search term along every time the filters are updated.
<input type="hidden" name="id_demande" value="[wpv-search-term param='id_demande']" class="js-wpv-filter-trigger" />
Use the search term shortcode in your conditional:
[wpv-conditional if="( '[wpv-search-term param='id_demande']' ne '' )"]<td></td>[/wpv-conditional]
Relevant Documentation: https://toolset.com/documentation/user-guides/conditional-html-output-in-views/
This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.
Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
---|---|---|---|---|---|---|
8:00 – 12:00 | 8:00 – 12:00 | 8:00 – 12:00 | 8:00 – 12:00 | 8:00 – 12:00 | - | - |
13:00 – 17:00 | 13:00 – 17:00 | 13:00 – 17:00 | 13:00 – 17:00 | 13:00 – 17:00 | - | - |
Supporter timezone: America/New_York (GMT-04:00)
This topic contains 8 replies, has 2 voices.
Last updated by 7 years, 3 months ago.
Assisted by: Christian Cox.