Skip Navigation

[Closed] View Loop displaying all results when no dropdown selection is made

This support ticket is created 3 years, 1 month ago. There's a good chance that you are reading advice that it now obsolete.

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
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Karachi (GMT+05:00)

This topic contains 3 replies, has 2 voices.

Last updated by Waqar 3 years, 1 month ago.

Assisted by: Waqar.

Author
Posts
#2231995
Screen Shot 2021-11-28 at 7.12.40 PM.png

I am trying to: Display results from dropdown.

Link to a page where the issue can be seen: thecrossing.net/christmas

I expected to see: Display no results until selection is made

Instead, I got: Displaying all results with no selection made.

This view is an exact copy of the view used on thecrossing.net/easter, with it updated to pull the new information. However, I am seeing this issue only with the new loop.

Page Password: OneCrossing

#2232093

Hi,

Thank you for contacting us and I'd be happy to assist.

To show the view's results, only when a value in the relationship filter has been selected, you can wrap the inner content of the view's loop ( i.e. <wpv-loop> ... </wpv-loop> ), in a condition like this:
( ref: https://toolset.com/documentation/legacy-features/views-plugin/using-shortcodes-in-conditions/ )


<wpv-loop>
[wpv-conditional if="( '[wpv-search-term param='wpv-relationship-filter']' ne '' )"]

......

[/wpv-conditional]
</wpv-loop>

I hope this helps and please let me know if you need any further assistance around this.

regards,
Waqar

#2233647

How can I just have the first result from the dropdown selected as the default? I have tried several jQuery, including https://toolset.com/forums/topic/how-to-prefill-default-value-in-dropdown-box/ but have not been successful.

#2234197

Thanks for writing back.

Can you please share temporary admin login details, along with the link to the page where you'd like to select the first option, by default?

I'll be in a better position to guide you with the next steps accordingly.

Note: Your next reply will be private and it is recommended to make a complete backup copy, before sharing the access details.

The topic ‘[Closed] View Loop displaying all results when no dropdown selection is made’ is closed to new replies.