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