64 function XoopsFormRadio($caption, $name, $value = null, $delimeter =
' ')
71 $this->_delimeter = $delimeter;
82 return ($encode && $this->_value !== null) ? htmlspecialchars($this->_value, ENT_QUOTES) :
$this->_value;
92 $this->_value = $value;
104 $this->_options[$value] = $name;
106 $this->_options[$value] = $value;
136 foreach($this->_options as $val => $name) {
137 $value[$encode ? htmlspecialchars($val, ENT_QUOTES) : $val] = ($encode > 1) ? htmlspecialchars($name, ENT_QUOTES) : $name;
150 return $encode ? htmlspecialchars(str_replace(
' ',
' ', $this->_delimeter)) :
$this->_delimeter;
166 $ele_delimeter = empty($this->columns) ? $this->
getDelimeter() :
'';
167 if (! empty($this->columns)) {
168 $ret .=
'<table><tr>';
172 foreach($ele_options as $value => $name) {
174 if (! empty($this->columns)) {
175 if (
$i % $this->columns == 0) {
180 $ret .=
'<input type="radio" name="' . $ele_name .
'" id="' . $ele_name . $id_ele.
'" title = "' . htmlspecialchars($ele_title, ENT_QUOTES) .
'" value="' . htmlspecialchars($value, ENT_QUOTES) .
'"';
181 if (isset($ele_value) && $value == $ele_value) {
182 $ret .=
' checked="checked"';
184 $ret .= $ele_extra .
' />' .
"<label name='xolb_{$ele_name}' for='" . $ele_name . $id_ele.
"'>" . $name .
"</label>" . $ele_delimeter ;
185 if (! empty($this->columns)) {
187 if (++
$i % $this->columns == 0) {
192 if (! empty($this->columns)) {
193 if ($span =
$i % $this->columns) {
194 $ret .=
'<td colspan="' . ($this->columns - $span) .
'"></td></tr>';