render_user_group_checkbox_select()

Description

Renders a list of user groups

Parameters

ColumnTypeDefaultDescription
$name string
$current array array Current selected values (eg. array(1, 3) for Admins and Super admins user groups selected)
$style string '' CSS styling that will apply to the outer container (ie. table element)

Return

void

Location

include/render_functions.php lines 1586 to 1605

Definition

 
function render_user_group_checkbox_select($name, array $current = array(), $style '')
    {
    
?>
    <table id=" echo escape($name); ?>" if('' !== $style) { ?>style=" echo $style?>" ?>>
        <tbody>
    
    
foreach(get_usergroups(true) as $group)
        {
        
?>
        <tr>
            <td><input id=" echo escape($name '_' $group['ref']); ?>" type="checkbox" name=" echo escape($name); ?>[]" value=" echo $group['ref']; ?>" if(in_array($group['ref'], $current)) { ?> checked ?> /></td>
            <td><label for=" echo escape($name '_' $group['ref']); ?>"> echo $group['name']; ?></label></td>
        </tr>
        
        
}
        
?>
        </tbody>
    </table>
    
    
}

This article was last updated 3rd June 2025 14:05 Europe/London time based on the source file dated 15th May 2025 11:30 Europe/London time.