|
|
|
 |
 |
 |
|
[ This topic is solved ]
|
|
Vincent Kleijnendorst
|
11 December 08 / 12:27 |
|
Changed at 11 December 08 / 13:33
Hi,
Currently FormHandler spits out xHTML tags:
For Strict DocTypes (HTML 4.01) this issues a problem with validating documents.
A nice feature would be to have a config var for the desired doctype:
<?php
fh_conf('FH_XHTML_CLOSING_TAG', '/');
?>
|
If set (by default) XHTML should be generated, else HTML:
<?php
// get the field HTML
$sField = sprintf(
'<input type="checkbox" name="%s" id="%s_%d" value="%s" %s' . FH_XHTML_CLOSING_TAG . '><label for="%2$s_%3$d">%s</label>',
$this->_sName.(is_array($this->_aOptions)?'[]':''),
$this->_sName,
$iCounter++,
htmlspecialchars($sValue),
(isset($this->_iTabIndex) ? 'tabindex="'.$this->_iTabIndex.'" ' : '').
((isset($this->_mValue) && ((is_array($this->_mValue) && in_array($sValue, $this->_mValue)) || $sValue == $this->_mValue) ) ?
'checked="checked" ':'').
(isset($this->_sExtra) ? $this->_sExtra.' ':''),
$sTitle
);
?>
|
Thanks,
Vincent
|
|
|
|
|
|