Skip Navigation

[Resolved] Filtering view results by URL Parameter passed by a Gravity Form

This support ticket is created 3 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 3 replies, has 2 voices.

Last updated by Kirk 3 years, 6 months ago.

Author
Posts
#2128535

I am trying to display a link to a pdf document for a school yearbook after the site visitor has submitted a gravity form providing their details and selecting the yearbook they require from a dropdown.

I am able to get the Gravity form working e.g submitted URL is hidden link

The field I am trying to filter is the gradyear field so only the correct yearbook should be displayed on the target page based upon the year in the URL parameter.

I am not sure whether I should be populating a search in my view with the URL parameter or using a filter within the view which filters based on the URL parameter.

Also I am not sure how to format the search or filter either.

At present I only have one yearbook in there (for 1977) and the link to it it displays no matter which year I select in my form.

My form is located on hidden link

I am using WP5.8, Toolset Blocks 1.5.3, Toolset Types Version 3.4.10

Thanks in advance for any help you can offer
Kirk

#2128723

Nigel
Supporter

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

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

Screenshot 2021-07-29 at 11.01.14.png

Hi Kirk

As a long-time user, I'm guessing you are using the legacy Views editor?

If the page containing your View loads with a URL parameter, you can add a Query Filter for some field where the value to filter by comes from a URL parameter (see screenshot example).

You specify the name of the URL parameter, and the field which is filtered.

Is that what you need?

#2128867

Hi Nigel,

Thanks for responding.

No, I am actually using the blocks version which makes some of these sorts of things just a little bit less intuitive perhaps.

I have tried adding a filter in the block view but it didn’t seem to work.

Based on your screenshot I will Re-visit my filter to see if it has all the same parameters as your example.

#2129333

Thanks for providing the visual example Nigel.

I think where I went wrong is that I did not have the field identifier set as a string.

Your help is very much appreciated.

thanks
Kirk