You are here

function _html_for_notselected_box in Multiselect 5

Provides html to draw the not selected box

1 call to _html_for_notselected_box()
multiselect_widget in ./multiselect.module
Implementation of hook_widget @todo Temporary 'print_r's need removing @todo Is the if ($field['widget']['type'] == 'multiselect_select' necessary? @todo Doesn't seem to populate list when in…

File

./multiselect.module, line 165
Allows users to select multiple items in an easier way than the normal node-reference widget

Code

function _html_for_notselected_box($notselectedoptions, $unselfield, $fieldname) {
  $boxhtml = '<div class="form-item">';
  $boxhtml .= "<select name='{$unselfield}' multiple='multiple' ";
  $boxhtml .= "class='form-select {$unselfield} multiselect_unsel' ";
  $boxhtml .= "id='{$fieldname}' size='10'>\n";
  foreach ($notselectedoptions as $value => $name) {
    $boxhtml .= "<option value='{$value}'>{$name}</option>";
  }
  $boxhtml .= "</select>\n";
  $boxhtml .= "</div>\n";
  return $boxhtml;
}