As in the title... I have a mandatory select list with a label which is fine until I tick the 'Allow "Other..." option' checkbox - then the label disappears.

I'm working around the problem for the moment by adding some markup to replace the label.

Comments

massiws’s picture

Same problem here with Webform 7.x-3.18 and select_or other 7.x-2.19.

The label of the select-option have always a class element-invisible, so it is always hidden, even if you change settings to inline or above.

Danny Englander’s picture

Correct me if I'm wrong but isn't this an issue with the Select (or other) module and not webform? At any rate I was able to duplicate the issue when the "other" option was enabled whether the label was set to inline or above. In that regard, you should probably transfer this issue to the Select (or other) queue. Note do not open a new issue there, simply change the project name using the auto complete widget.

quicksketch’s picture

Hiya guys. This is probably a Webform issue, since Webform does the integration with Select or Other itself. Thanks for the help nonetheless @highrockmedia. :)

drewkeller’s picture

Here's what's working for me (in components/select.inc, line 422).

  // The Drupal FAPI does not support #title_display inline so we need to move
  // to a supported value here to be compatible with select_or_other.

  // WRONG: title is always invisible
  //$element['select']['#title_display'] = $element['#title_display'] === 'inline' ? 'before' : $element['#title_display'];

  // WORKING: title is displayed 'before' if it is set to inline or before in the options
  if ($element['select']['#title_display'] === 'inline') {
    $element['select']['#title_display'] = 'before';
  }

If I comment out this section and set the label of the webform component to inline, it just never shows up in the displayed form. I guess that's what the coded comment above is talking about.

jmsosso’s picture

The issue was introduced in Select (or other) 7.x-2.19, I just back to 7.x-2.18 and the labels shows up correctly.

massiws’s picture

I can confirm: Select (or other) 7.x-2.18 works fine: the patch select_or_other_required-2030249-1.patch added in Select (or other) 7.x-2.19 cause label disappear.

fnikola’s picture

Confirming that #5 backing out Select (or other) 7.x-2.19 to 7.x-2.18 as jmsosso corrects the issue of the label not displaying.

massiws’s picture

Problem fixed: Select (or other) 7.x-2.20 works fine!

Thank you.

DanChadwick’s picture

Issue summary: View changes
Status: Active » Closed (works as designed)