Changes

Select Check Boxes by Default

189 bytes added, 15:48, 15 April 2010
no edit summary
 
If you want to have one or more [[Custom Field Type: Select Many – Check Boxes|Check Boxes]] selected by default you need to create a [[Browser Script]] to select the boxes.
The following will check the 2nd and 4th options for [[Custom Field]] number 568279.
<pre>
var oldonload = window.onload;if (typeof window.onload != 'function DefaultChecked') { window.onload = newonload;}else { window.onload = function() { oldonload(); newonload(); }} function newonload()
{
var frm=document.form1;
if(frm){ if (frm.opportunityid.value==0) { frm.cf_568279[2].checked = true; frm.cf_568279[4].checked = true; }
}
}
DefaultChecked()
</pre>
0
edits