mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-11-27 18:10:42 +00:00
add optgroup in formField()
This commit is contained in:
parent
7fffe3867d
commit
e9d606ce27
|
|
@ -956,11 +956,15 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
|
|||
echo ">";
|
||||
if(isset($value['options']) && is_array($value['options'])) {
|
||||
foreach($value['options'] as $val) {
|
||||
if(is_string($val)) {
|
||||
echo '<optgroup label="'.$val.'">';
|
||||
} elseif(is_array($val)) {
|
||||
echo '<option value="'.$val[0].'"'.(!empty($val[2]) ? ' selected' : '');
|
||||
if(!empty($val[3]) && is_array($val[3]))
|
||||
foreach($val[3] as $a)
|
||||
echo ' '.$a[0].'="'.$a[1].'"';
|
||||
echo '>'.$val[1].'</option>';
|
||||
}
|
||||
}
|
||||
}
|
||||
echo '</select>';
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user