Skip Navigation

[Closed] JS Frontend Event dependent on results or no results.

This support ticket is created 2 years, 6 months 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.

This topic contains 1 reply, has 2 voices.

Last updated by Nigel 2 years, 6 months ago.

Author
Posts
#2366539

Tell us what you are trying to do?

Hi I am placing my results in a modal wich work just fine. But I would like to only open the modal if there are results and give a alert if there are no result.

Is there any documentation that you are following?

https://toolset.com/forums/topic/show-results-in-modal/

#2366713

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

If I've understood what you want to do, then you would need to modify the solution shown in the other thread so that all of the markup for the modal was moved inside of the wpv-items-found shortcode (so that it was only output when there were results to show, rather than always as it is currently).

Then in the wpv-no-items-found section, you could add a script tag containing an alert command, which would only be added to the page when there are no results to show.

The topic ‘[Closed] JS Frontend Event dependent on results or no results.’ is closed to new replies.