Hi there

Great module, but when I do not select an option, the error message shown is "The field is required" (or somthing like this, it's in German). The title of the field is missing. In the module, the #title is commented on Line 211:

    //'#title' => $element['#title'], // Title is added in the prefix section. If added here, displays incorrectly.

Shouldn't this be set to work propper with the messages?

Regards Jens

CommentFileSizeAuthor
#5 Screen shot 2010-05-23 at 5.00.13 PM.png24.09 KBzeusent
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

attheshow’s picture

Assigned: Unassigned » attheshow
Status: Active » Fixed

Fixed in dev version. Please test and report if the fix works for you.

attheshow’s picture

Version: 6.x-1.6 » 6.x-1.x-dev
JensH’s picture

Hi, Sorry I cannot test this, because I patched this on my own - besides some other custom changes - and we're in productivity stage now. But as far I can see, there is no big differnce and mine is working fine:

  $prefix_pre = '<div class="form-item"><label for="edit-title">'. t($element['#title']) .':';
  if ($field['required']) {
    $prefix_pre .= '<span class="form-required" title="'. t('This field is required.') .'"> * </span>';
  }
  $prefix_pre .= "</label>\n";

  $prefix_pre .= "<div id=\"multiselect_labels\">\n";
  $prefix_pre .= "\n</div>\n";
  $prefix_pre .= "<div id=\"multiselect_available\">";
  $prefix_pre .= _multiselect_html_for_unselected_box_start($unselfield, $element['#field_name']);
  $prefix_options = _multiselect_html_for_unselected_box_options($unselected_options);
  $prefix_post = "</select>\n</div>\n";
  $prefix_post .= _html_for_buttons($element['#field_name']);

  $element[$field_key] = array(
    '#type' => 'select',
    '#title' => $element['#title'],
    '#description' => $element['#description'],
    '#required' => isset($element['#required']) ? $element['#required'] : $field['required'],
    '#multiple' => isset($element['#multiple']) ? $element['#multiple'] : $field['multiple'],
    '#options' => $selected_options,
    '#size' => 10,
    '#prefix' => $prefix_pre . $prefix_options . $prefix_post,
    '#suffix' => "\n</div>\n",
    '#attributes' => array('class' => "$selfield multiselect_sel", 'id' => $element['#field_name']),
    '#default_value' => isset($element['#value'][$field_key]) ? $element['#value'][$field_key] : NULL,
  );

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

zeusent’s picture

Status: Closed (fixed) » Needs work
FileSize
24.09 KB

I think that by setting the title to that form element it breaks the rendering of it by showing the title twice in the page. So I think somebody should address this problem some other way.

attheshow’s picture

Version: 6.x-1.x-dev » 6.x-1.7

I'm not able to duplicate this issue. A CSS change was also included in this bug fix that is present in version 1.7. Maybe try clearing your browser cache? The label for the original form element is hidden.

zeusent’s picture

Status: Needs work » Closed (fixed)

Yup. My mistake. Sorry for reopening the issue with no good arguments. We overwrote the CSS in our theme for something else. Fixed now.