How to make xoopsformhidden xhtml-valid?

Requested and Answered by Anonymous on 2005/6/8 5:59:19

How to make xoopsformhidden xhtml-valid?

Remark: I don't know if this is really a FAQ. But this one disturbed me when making my page xhtml-valid. There are two possible solutions. 1. make a tray with another formelement inside a module or 2. make the change systemwide which is much easier for the non-php-techie. Look for function render in include/xoopsform/xoopsformhidden.php and the line which reads:

return ".$this->getName()."' id='".$this->getName()."' value='".$this->getValue()."' />";
Problem with this code is, that the input-field for hidden will inserted between the tr-lines of the table which is not xhtml-valid. Just change the above line to:
return ".$this->getName()."' id='".$this->getName()."' value='".$this->getValue()."' />";
What I did was just inserting another table-row. To prevent the new table-row from being displayed I used the style display:none. That is all!

This Q&A was found on XOOPS Web Application System : https://xoops.org/modules/smartfaq/faq.php?faqid=485