Collections functions
General functions
Node functions
Render functions
Theme permission functions
User 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 1525 to 1539

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 (int) $usergroup['ref']; ?>" echo in_array($usergroup['ref'], $current) ? ' selected' ''?>> echo escape($usergroup['name']); ?></option>
        
        
}
        
?>
    </select>
    
    
}

This article was last updated 22nd May 2024 15:35 Europe/London time based on the source file dated 17th May 2024 16:45 Europe/London time.