Skip Navigation

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

This support ticket is created hace 7 años, 3 meses. 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.

Hoy no hay técnicos de soporte disponibles en el foro Juego de herramientas. Siéntase libre de enviar sus tiques y les daremos trámite tan pronto como estemos disponibles en línea. Gracias por su comprensión.

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)

Etiquetado: ,

Este tema contiene 3 respuestas, tiene 2 mensajes.

Última actualización por Noman hace 7 años, 3 meses.

Asistido por: Noman.

Autor
Mensajes
#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 enlace oculto

#557787

Noman
Supporter

Idiomas: Inglés (English )

Zona horaria: 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

Idiomas: Inglés (English )

Zona horaria: Asia/Karachi (GMT+05:00)

Hello,

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

Thank you