Loading...
 
Skip to main content

Features / Usability


Prefill a checkbox with JQuery plugin

I want to prefill a checkbox field in a tracker with the JQuery plugin.
I try the code snippet from the documentation siteQuestion

The field ID of the checkbox is 170.

JQuery
Copy to clipboard
{JQ()} $('[name="track[170]"]')[1].checked=true; // to prefill a checkbox $("#area_118").val("KnowHowID = "); // to prefill a text area {JQ}

The prefill of the textare with the field ID 118 work fine.
But I can't set the checkbox.

What am I doing wrong?
I use tiki 6v4.

Regards
Andreas

No idea myself. You can ask in Irc to jonnyb or robertplummer (they are the exports in Jquery): they were the ones who share their knowledge with Jquery in tiki, that I took to write my contributions at the doc. page about Jquery.

Please, if you find out, update (or extend, whatever is needed) the documentation page:
https://doc.tiki.org/PluginJQQuestion