Collections functions
Encryption functions
General functions
Render functions
Theme permission functions
Video 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 1295 to 1316

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>
    

    
return;
    }

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