1

I have a set of popovers that show supplemental info upon hovering. They display, but only the first word of the string.

template:

<a data-toggle="popover" data-trigger="hover"  data-content={{std.Description}} >&nbsp;<i class="fa fa-question"></i></a>
...
$("[data-toggle=popover]").popover();

The field in question is a Django TextField:

Description = models.TextField(blank=True)

Behavior: enter image description here

This description had several words, but all after the first were cut off.

DeltaG
  • 760
  • 2
  • 9
  • 28

1 Answers1

4

The solution is the same as for Contain form within a bootstrap popover? , though the title of the post may be misleading. The issue is that there need to be quotes containing the desired variable:

data-content="{{std.Description}}"

Additionally, if you want to include html in the popover (lists, <br>, etc.), include data-html="true".

Community
  • 1
  • 1
DeltaG
  • 760
  • 2
  • 9
  • 28