Collections functions
Encryption functions
General functions
Theme permission 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 1286 to 1307

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 10th July 2020 21:05 Europe/London time based on the source file dated 8th July 2020 11:40 Europe/London time.