Skip Navigation

[Resuelto] make it possible for only 1 radio button to be checked at a time

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

Etiquetado: ,

Este tema contiene 1 respuesta, tiene 1 mensaje.

Última actualización por Ido Angel hace 6 años, 7 meses.

Autor
Mensajes
#760373

hey,

I have a search with 2 post types - posts, and events.
I am filtering categories in each cpt, using radio buttons.

page results should show only 1 category (from posts it can be either articles, videos, audio. from events it can be courses or retreats).

thing is, since they are 2 different cpts, once i press "videos" (for example) and then press "courses" (for example), both radio buttons are marked checked and results are not showing properly.

I want to be able to press only 1 radio button in the page, so that if i press "videos" it will show videos, and if i later press "retreats" it will show only retreats.

i tried changing the relationship between filters to "OR" instead of "AND", but that didn't work.

Page is here:

enlace oculto

It's in hebrew, but all radios (the appear as checkboxes, but they are radios) except the 2 leftmost are posts. the 2 leftmost are events.

thanks!

#760523

lol that was quick 🙂

i added this:

$("[class=js-wpv-filter-trigger]").on("click",function(){

    $("[class=js-wpv-filter-trigger]").prop('checked', false)
    $(this).prop('checked', true)

});

and it worked!
hope this helps others somehow.