Skip Navigation

[Resolved] how to make checkboxes unselectable in toolset

This thread is resolved. Here is a description of the problem and solution.

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 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.

This topic contains 18 replies, has 2 voices.

Last updated by opadipeO 1 year, 10 months ago.

Assisted by: Christopher Amirian.

Author
Posts
#2536389

Christopher Amirian
Supporter

Languages: English (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
Supporter

Languages: English (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!