<?php
// $Id: tableform.php,v 1.3 2003/03/19 06:58:01 half-dead Exp $
// ------------------------------------------------------------------------- //
//               E-Xoops: Content Management for the Masses                  //
//                       < http://www.e-xoops.com >                          //
// ------------------------------------------------------------------------- //
// Original Author: Kazumi Ono
// Author Website : http://www.mywebaddons.com/ , http://www.myweb.ne.jp
// License Type   : GPL: See /manual/LICENSES/GPL.txt
// ------------------------------------------------------------------------- //
if (!defined("EXOOPS_XOOPSTABLEFORM_INCLUDED")) {
	define("EXOOPS_XOOPSTABLEFORM_INCLUDED", 1);
include_once(XOOPS_ROOT_PATH."/class/xoopsform/form.php");
class XoopsTableForm extends XoopsForm {
	function XoopsTableForm($title, $name, $action, $method="post") {
		$this->XoopsForm($title, $name, $action, $method="post");
	}
//---------------------------------------------------------------------------------------//
/**
* Description
*
* @param type $var description
* @return type description
*/
function render() {
$ret = $this->getTitle()."<form name='".$this->getName()."' id='".$this->getName()."' action='".$this->getAction()."' method='".$this->getMethod()."'".$this->getExtra()."><table border='0' width='100%'>";
foreach ( $this->getElements() as $ele ) {
	if ( !$ele->isHidden() ) {
		$ret .= "<tr valign='top'><td nowrap='nowrap'>".$ele->getCaption()."</td><td>".$ele->render()."</td></tr>";
		} else {
			$ret .= $ele->render();
		}
}
$ret .= "</table></form>";
return $ret;
}
//---------------------------------------------------------------------------------------//
} // END CLASS
} // END DEFINED
?>
