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



Generate an html multi-select + options block

used as the values of the options, and the values are the choices the user sees. (But see
$usekeys, below.) Usually a $lang entry whose value is an array of strings.
If set to false the values from $choices will be used for both the values of the options
and the text the user sees. Defaulted to true.


$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.
$usekeys boolean true tells whether to use the keys from $choices as the values of the options.
$width integer 300 the width of the input field in pixels. Default: 300.
array string $choices the array of choices -- the options in the select block. The keys are


include/plugin_functions.php lines 678 to 696


function config_multi_select($name$label$current$choices$usekeys=true$width=300)
  <div class="Question">
    <label for=" echo $name?>" title=" echo str_replace('%cvn'$name$lang['plugins-configvar'])?>"> echo $label?></label>
    <select name=" echo $name?>[]" id=" echo $name?>" class="MultiSelect" multiple="multiple"  if(count($choices) > 7) echo ' size="7"'?> style="width: echo $width ?>px">

foreach($choices as $key => $choice)
'    <option value="' $value '"' . ((in_array($value,$current))?' selected':'') . ">$choice</option>";
    <div class="clearerleft"></div>


This article was last updated 6th December 2023 11:05 Europe/London time based on the source file dated 7th September 2023 11:45 Europe/London time.