setValue('firstname', 'John'); ?>
setValue('countries', array('USA', 'Canada')); ?>In this example, we are setting the value of a checkbox field named 'countries' to an array with two values 'USA' and 'Canada'. The JForm library/package is included in the Joomla CMS framework.