Skip Navigation

[Resolved] Custom Search: RESET Button to reset ALL search parameters?

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

Sun Mon Tue Wed Thu Fri Sat
- 12:00 – 17:00 12:00 – 17:00 12:00 – 17:00 12:00 – 17:00 12:00 – 17:00 -
- 18:00 – 21:00 18:00 – 21:00 18:00 – 21:00 18:00 – 21:00 18:00 – 21:00 -

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

This topic contains 3 replies, has 2 voices.

Last updated by Noman 7 years, 3 months ago.

Assisted by: Noman.

Author
Posts
#557678

a.R

By pressing the RESET button in a search form, the OLD parameters (checkboxes) that have already been active for the current search results will NOT be resetted. I would like to reset ALL serach parameters, even the "old" ones.

I use this code:

<input type="reset" id="form-loeschen" value="Zurücksetzen">

---

jQuery ( '#form-loeschen' ).on( 'click', function() {
   jQuery( 'input:not(#form-loeschen)' ).val( '' );
   jQuery( 'radio' ).prop( 'checked', false);
   jQuery( 'input:not(#k-such)').prop( 'checked', false);
});

However, this doesn´t work

On hidden link

#557787

Noman
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi,

Thank you for contacting Toolset support. I am bit confused that what you want to achieve, we have built-in RESET button in the filters section for Custom Search View, you can use.

1. Is there any special reason that you are creating your own RESET button using jQuery?

2. I have visited your page and it looks like checkboxes and reset button are not connected to each other. Are you using checkboxes and reset button in same form?

3. Please provide back-end screenshot of your Search View

4. Please provide front-end screenshot with comments (with selected parametric values and search results) so that I can understand the expected output.

Thank you

#558046

a.R

Hi, thanks for your answer.

The normal reset button does not clear all input fields, but only resets them to the last executed search, right? (I don't reload the whole page for a new search.)

As far as I heard, clearing all input field is only possible with java script.

Or is there a simpler way?

Thank you, regards, Achim

#558068

Noman
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hello,

RESET button clear all input fields, I have recorded a small video to confirm this:
hidden link

Thank you