Dear all,
I want to change the category select box to allow multiple selection of categories per member.
I think that the code to do so is in the html.form.class.php file.
Am i right? secondly, if this is indeed the which lines in the following code i have to change, and to what?
[code]
function select_all_categories($type, $selected='', $select_name="", $maxlength=64, $excludeafterid=0)
{
global $langs;
$langs->load("categories");
if ($select_name=="") $select_name="catMere";
$cat = new Categorie($this->db);
$cate_arbo = $cat->get_full_arbo($type,$excludeafterid);
$output = '';
if (is_array($cate_arbo))
{
if (! count($cate_arbo)) $output.= ''.$langs->trans("NoCategoriesDefined").'';
else
{
$output.= ' ';
foreach($cate_arbo as $key => $value)
{
if ($cate_arbo[$key]['id'] == $selected)
{
$add = 'selected="selected" ';
}
else
{
$add = '';
}
$output.= ''.dol_trunc($cate_arbo[$key]['fulllabel'],$maxlength,'middle').'';
}
}
}
$output.= '';
$output.= "\n";
return $output;
}
[/code]
Thank you,
Dan.
↧