Login Retreive lost passwordRegister
Search

Forum Index / Feedback / Doctype awareness (feature request)

[ 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:

<input />
<br />


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

  Johan Wiegel (Admin) 11 December 08 / 13:26  
Good point will be added in next version.

  Johan Wiegel (Admin) 24 February 09 / 15:15  
added in version FH3 v1.2.8

  Top


powered by PHP-GLOBE   © 2004 - 2012 FormHandler. All rights reserved.   -   Open source license