config_multi_rtype_select()

Description

Generate an html multi-select check boxes block for selecting multiple the RS resource types. The
selected field type is posted as an array of the values of the "ref" column of the selected
resource types.

Parameters

ColumnTypeDefaultDescription
$name string the name of the select block. Usually the name of the config variable being set.
$label string the user text displayed to label the select block. Usually a $lang string.
$current
$width integer 300 the width of the input field in pixels. Default: 300.
array integer $current the current value of the config variable being set

Location

include/plugin_functions.php lines 1094 to 1117

Definition

 
function config_multi_rtype_select($name$label$current$width 300)
{
    global 
$lang;
    
$rtypes get_resource_types();
    
?>
    <div class="Question">
        <label for=" echo escape($name?>" title=" echo escape(str_replace('%cvn'$name$lang['plugins-configvar'])) ?>"> echo escape($label?></label>
        <fieldset id=" echo escape($name?>" class="MultiRTypeSelect">
             foreach ($rtypes as $rtype) { ?>
                <input
                    type="checkbox"
                    value=" echo escape($rtype['ref']) ?>"
                    name=" echo escape($name?>[]"
                    id=" echo escape($name $rtype['ref']) ?>"
                     echo in_array($rtype['ref'], $current) ? ' checked="checked"' '' ?>
                >
                <label for=" echo escape($name $rtype['ref']) ?>"> echo escape(lang_or_i18n_get_translated($rtype['name'], 'resourcetype-')) ?></label>
                <br />
             ?>
        </fieldset>
        <div class="clearerleft"></div>
    </div>
    
}

This article was last updated 13th July 2025 21:35 Europe/London time based on the source file dated 4th July 2025 10:35 Europe/London time.