Skip Navigation

[Resolved] filter on keypress

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

Supporter timezone: America/Sao_Paulo (GMT-03:00)

Tagged: 

This topic contains 1 reply, has 2 voices.

Last updated by Mateus Getulio 1 year, 4 months ago.

Assisted by: Mateus Getulio.

Author
Posts
#2629043

I've got a view with filter, just searching by name. How can I trigger the search after each keypress, instead of waiting for SEARCH button?

Just

#2629245

Mateus Getulio
Supporter

Languages: English (English )

Timezone: America/Sao_Paulo (GMT-03:00)

Hello there,

Regarding the search inputs, they are currently structured within a form. When you update the results, even through ajax, the entire form gets updated. This also leads to the replacement of the current form along with the View results.

I'm afraid achieving what you desire using Views alone might not be feasible. A custom solution is necessary for ajax submissions after each keystroke/keypress + handling the returned matching posts to populate the results.

I'm afraid that this is beyond the scope of our support policy.

However, I can suggest you some helpful tutorials that cover using ajax in the context of WordPress, such as the one available at: hidden link

To generate the results of the View query as HTML, you can incorporate the API function render_view in your code. For more information, you can visit: https://toolset.com/documentation/programmer-reference/views-api/#render_view

If implementation becomes a roadblock, you might want to explore the list of Toolset Contractors for assistance: https://toolset.com/contractors/

Best regards,

Mateus