Saltar navegación

[Resuelto] how to make checkboxes unselectable in toolset

Este hilo está resuelto. Aquí tiene una descripción del problema y la solución.

Problem:

How to make checkboxes in a form unselectable?

Solution:

Add the JS code below:

jQuery('#cred_form_9608_1_1 input[type="checkbox"]').attr('disabled', 'disabled');

replace cred_form_9608_1_1 with the generated code for your instance.

Relevant Documentation:

https://toolset.com/course-lesson/adding-custom-javascript-to-views-templates-and-archives/

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

Este tema contiene 18 respuestas, tiene 2 mensajes.

Última actualización por opadipeO 3 years, 4 months ago.

Asistido por: Christopher Amirian.

Autor
Mensajes
#2536389

Christopher Amirian
Colaborador

Idiomas: Inglés (English )

Hi there,

It must have been cached on my browser console as I was working on the console to find the best code to do that.

Anyway, as the issue is addressed we consider this ticket as resolved.

Thanks.

#2536887

Hello,
What if I want to delete the js code and don;t want it anymore would i have to come and ask you to do that for me from your cache. Anyways i have copied the code to the form js editor i want to add it. I hope you clear it from wherever you have placed the code that makes it work. I want to see the code on my js editor where i can control it.

tHANKS

#2537131

Christopher Amirian
Colaborador

Idiomas: Inglés (English )

No no.
There was a misunderstanding.

You do not need to ask me anything.

If you add the code to the JS Editor in the form it will disable the items. If you remove it will show the items enabled.

Just make sure that when you add or remove the code you save the form and also clear your browser cache.

That's it. You do not need any other thing from my side.

Thanks.

#2537257

My issue is resolved now. Thank you!