Skip Navigation

[Resolved] Manually add Query Parameter to Legacy View

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
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10: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/Kolkata (GMT+05:30)

This topic contains 3 replies, has 2 voices.

Last updated by Minesh 1 year, 5 months ago.

Assisted by: Minesh.

Author
Posts
#2683046
Screenshot 2024-02-12 at 12.40.01 PM.png
Screenshot 2024-02-12 at 12.36.52 PM.png

Hi!

I have a few fields that only the admins have access to (see attachment from 12:36) and I would like to filter based on those fields in my Legacy custom view. But I want to set the filter parameters as an admin, and not have a UI component associated with it.

In my mind, that means adding the correct query params, like

&testimonial=1

to the query string before it gets sent to the server.

I'm guessing the place to do that is in the "Search and Pagination" box, but I'm not sure how to do that (attachment at 12:40).

Is that possible?

#2683195

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

When you say manually add the query parameter - do you want to pre-filter the view results before the view result display on the page?

I see the testimonial field is added on the form - or do you mean that when testimonial field option is selected you want to show/hide some field based on the testimonial field option selection.

If you can share bit more information with clear test case and problem URL where I can see the fields etc.. I will be able to guide you in the right direction.

In addition to that - Could you please send me debug information that will help us to investigate your issue.
=> https://toolset.com/faq/provide-debug-information-faster-support/

#2683291

Hi.

The view page allows members to search a member directory.

For example, they might search by "state" or filter by "name" and other such fields.

I would also like to filter the results by other fields, without the user's knowledge. I don't want them to see the other fields as filtering options or be able to change them.

Right now I know how to allow the user to filter by a certain field. I just also want to filter by other values without them knowing.

Does that make sense?

#2683592

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Do you mean that you want to filter the view results based on the URL param like you shared, you will pass the URL param to your page: hidden link

So what is testimonial here? is it a custom field? and is the "testimonial" custom field already added as frontend filter to your view?

Basically, lets say you have three custom fields A, B and C and with the view you created you added the custom field A (as dropdown select) on your page as frontend filter so that user can filter the result.

Now, if you want to also filter the results with custom field B and C and dont want to add those field as frontend filter so that user can interact with it, you should add a Query Filter from your view's Query Filter section for the custom field B and C filter with URL param. Does that makes sense?

#2684147

Query filters was exactly what I was looking for. I didn't have that option in my View because I didn't choose the View type with "Full Control" at first. But now I do. Thank you!