Problem/Motivation

Bootstrap themes have an op[tion to use 'smart descriptions' by default which causes field descriptions to be rendered as tooltips. In order to prevent an element being rendered as a smart description, the element must have #smart_description set to FALSE.

Using Webform with a Bootstrap theme with smart descriptions set as default means that the description is always rendered as a tooltip regardless of the settings on the field within webform.

Proposed resolution

The logical place to change this behaviour is the webform_bootstrap module. The value for '#smart_description' should be set to FALSE if the description display is set to 'before' or 'after'.

Comments

Alan-H created an issue. See original summary.

alanhdev’s picture

Title: Description display position overridden by Bootstrap » Element description position overridden by Bootstrap
alanhdev’s picture

Patch file attached to add the functionality to the webform_bootstrap module file.

alanhdev’s picture

Status: Active » Needs review

  • jrockowitz committed 0c921d3 on 8.x-5.x authored by Alan-H
    Issue #2974442 by Alan-H: Element description position overridden by...
jrockowitz’s picture

Status: Needs review » Fixed

I reviewed and committed the patch. Thanks

Status: Fixed » Closed (fixed)

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

ewaters5’s picture

Thanks to both of you - enabling this module fixed my issue 5 years later!

andyf’s picture

Just wanted to say I think I was bitten by this on a site that doesn't have the description display explicitly configured (in which case I understand it defaults to after). I've opened #3482205: Element description overridden by Bootstrap when using defaults. Thanks!