4
lets say i made this class.
class/xoopsform/formdualselect.php
class XoopsFormDualSelect extends XoopsFormElement
{
var $_first;
var $_second;
function XoopsFormDualSelect($caption, $firstObj, $secondObj)
{
$this->_first = $firstObj;
$this->_second = $secondObj;
$this->setCaption($caption);
}
/**
* Prepare HTML for output
*
* @return string HTML
*/
function render()
{
$ele_name = $this->_first->getName();
$ele_title = $this->_first->getTitle();
$ele_value = $this->_first->getValue();
$ele_options = $this->_first->getOptions();
$ret = '';
$ele_name = $this->_second->getName();
$ele_title = $this->_second->getTitle();
$ele_value = $this->_second->getValue();
$ele_options = $this->_second->getOptions();
$ret .= ' ';
return $ret;
}
/**
* @seealso XoopsForm::renderValidationJS
*/
function renderValidationJS()
{
//not finished.
return '';
}
}
i could use.
//load class file
include_once $GLOBALS['xoops']->path('class/xoopsform/formdualselect.php');
$dualDrop = new XoopsFormDualSelect('Something Cool',$umode_select,$uorder_select); //adding two xoopsselect obj to the element
$form->addElement($dualDrop); //adding to the form
the above code is not tested well. (made it in like 10 minutes, but works). hopefully someone can build on it.
CBB / LatestNews / Publisher / XM-Spotlight
(ノ◕ヮ◕)ノ*:・゚✧