Coding standards
Security in ResourceSpace
Developer reference
Database
Action functions
Admin functions
Ajax functions
Annotation functions
API functions
Collections functions
Comment functions
Config functions
CSV export functions
Dash functions
Debug functions
Encryption functions
Facial recognition functions
File functions
General functions
Language functions
Log functions
Login functions
Message functions
Migration functions
Node functions
PDF functions
Plugin functions
Render functions
Reporting functions
Request functions
Research functions
Slideshow functions
Theme permission functions
User functions
Video functions
Database functions
Metadata functions
Resource functions
Search functions
Map functions
Job functions
Tab functions
Test 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 1550 to 1564

Definition

 
function render_user_group_multi_select($name, array $current = array(), $size 10$style '')
    {
    
?>
    <select id=" echo escape($name); ?>" class="MultiSelect" name=" echo escape($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 4th December 2024 09:05 Europe/London time based on the source file dated 3rd December 2024 11:55 Europe/London time.