Collections functions
General functions
Node functions
Render functions
Theme permission functions
User functions
Resource functions

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 1552 to 1571

Definition

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

This article was last updated 19th March 2024 04:35 Europe/London time based on the source file dated 15th March 2024 17:00 Europe/London time.