Collections functions
Encryption functions
General functions
Render functions
Theme permission functions
Video functions
Resource functions

render_user_group_multi_select()

Parameters

ColumnTypeDefaultDescription
$name string
$current array array Current selected values (eg. array(1, 3) for Admins and Super admins user groups selected)
$size int 10 How many options to show before user has to scroll
$style ''

Location

include/render_functions.php lines 1269 to 1283

Definition

 
function render_user_group_multi_select($name, array $current = array(), $size 10$style '')
    {
    
?>
    <select id=" echo $name?>" class="MultiSelect" name=" echo $name?>[]" multiple="multiple" size=" echo $size?>" style=" echo $style?>">
    
    
foreach(get_usergroups() as $usergroup)
        {
        
?>
        <option value=" echo $usergroup['ref']; ?>" echo (in_array($usergroup['ref'], $current) ? ' selected' ''); ?>> echo $usergroup['name']; ?></option>
        
        
}
        
?>
    </select>
    
    
}

This article was last updated 3rd December 2020 13:35 Europe/London time based on the source file dated 13th November 2020 15:00 Europe/London time.