function getHelpButton(){
return $this->_helpbutton;
}
+ /**
+ * Automatically generates and assigns an 'id' attribute for the element.
+ *
+ * Currently used to ensure that labels work on radio buttons and
+ * checkboxes. Per idea of Alexander Radivanovich.
+ * Overriden in moodleforms to remove qf_ prefix.
+ *
+ * @access private
+ * @return void
+ */
+ function _generateId()
+ {
+ static $idx = 1;
+
+ if (!$this->getAttribute('id')) {
+ $this->updateAttributes(array('id' => substr(md5(microtime() . $idx++), 0, 6)));
+ }
+ } // end func _generateId
}
?>
\ No newline at end of file
* @var string
*/
var $_helpbutton='';
- var $_elementTemplateType='default';
+ var $_elementTemplateType='fieldset';
//would cause problems with client side validation so will leave for now
//var $_elementTemplateType='fieldset';
/**
function getHelpButton(){
return $this->_helpbutton;
}
+ /**
+ * Automatically generates and assigns an 'id' attribute for the element.
+ *
+ * Currently used to ensure that labels work on radio buttons and
+ * checkboxes. Per idea of Alexander Radivanovich.
+ * Overriden in moodleforms to remove qf_ prefix.
+ *
+ * @access private
+ * @return void
+ */
+ function _generateId()
+ {
+ static $idx = 1;
+
+ if (!$this->getAttribute('id')) {
+ $this->updateAttributes(array('id' => substr(md5(microtime() . $idx++), 0, 6)));
+ }
+ } // end func _generateId
}
?>
\ No newline at end of file