* Convenience function to build an HTML form label
* @param $label text of the label
* @param $id
- * @param $attrs Array, other attributes
+ * @param $attribs Array, other attributes
* @return string HTML
*/
public static function label( $label, $id, $attribs=array() ) {
public function __construct( $name = false, $id = false, $default = false ) {
if ( $name ) $this->setAttribute( 'name', $name );
if ( $id ) $this->setAttribute( 'id', $id );
- if ( $default ) $this->default = $default;
+ if ( $default !== false ) $this->default = $default;
}
public function setDefault( $default ) {