1
class XoopsFormBreak extends XoopsFormElement {
/**
* Constructor
*
* @param string $caption Caption
* @param string $class Text
*/
function XoopsFormBreak($caption = '', $class= ''){
if (!empty($class)) {
$class = "class='$class'";
}
$this->setClass($class);
$this->setCaption($caption);
$this->setHidden();
}
/**
* Prepare HTML for output
*
* @return string
*/
function render(){
return ". $this->getClass() . "/>". $this->getCaption() . " |
";
}
}
?>
I desperately wanted to have category breaks in a form I was designing and at the same time, wanted to stay within Xoop's standards. As such, I created a new FormElement that would let me add a break within the form. A visual example is below (note "General Settings" and "Album List View" rows). As I'm relatively new to PHP, I was wondering if there were any inherent security holes in what I've created.

Any help is appreciated, as always. Thanks in advance.
Brad