Adding hover text (hover-help) to a form field that isn't an SBM field

I've got a form that has a label and field I've defined in Composer.  It's not a SBM "field" in the usual sense, i.e. it's not a field in the DB.  The field will be populated by JS.  I would like the label and field to behave similar to a "normal" SBM field, with pop-up hover-help appearing when the user hovers the mouse over the label.  Because the field is not in a field in the database, SBM doesn't provide the infrastructure to display the field's TS_DESCRIPTION as hover-help.

I'm trying to figure out how SBM does it so that I can just tap into the existing look-and-feel.  As near as I can tell, this is the code that's being called when a user hover's over a label.  It's in jquery-sbm.min.js

eventHandle = elemData.handle = function( e ) {                                   // Hover-help?

   // Discard the second event of a jQuery.event.trigger() and                    // Hover-help?
   // when an event is called after a page has unloaded                           // Hover-help?
   return typeof jQuery !== "undefined" && jQuery.event.triggered !== e.type ?    // Hover-help?
   jQuery.event.dispatch.apply( elem, arguments ) : undefined;                    // Hover-help?
};

I haven't gotten any further at this point.  Has anyone figured this out?

This is SBM 11.8.  We're working on upgrading to 12.something.

  • 0  

    Hi Paul. If I understand correctly, you have an SBM form with a control such as an EditBox and a corresponding Label. It should be as simple as editing the properties of the label control on the form and populating the Description field with your help text. I just tried it quickly and successfully previewed it.

  • 0 in reply to   

    I'm using a "Text" field.  Does that mean that I picked the one and only control that doesn't support hover help?

  • 0   in reply to 

    Essentially :) Hopefully switching to a EditBox is a small change for you.

  • 0

    After some investigation I've discovered that the "Text" control is the only one of the "general-purpose" non-container Controls that does not have Tool-tip / Hover-help popup help.  The method used by Composer to control what appear is documented in the table below.

    The ComboBox, EditBox and ListBox controls consume 2 horizontally adjacent cells when placed on a form: a Label cell to the left and a Control cell to the right.  For the purposes of this post I'm saying that the "Control" cell is where the information to the user is actually displayed.  The Button, HyperLink, Image and Text controls only consume a single cell on the form.  Again, for the purposes of this post I'm saying that is the "Control" cell.  This is just my nomenclature and has nothing to do with official SBM documentation.

    Note that all 7 controls have a "Description" field associated with the "Control" cell. 

    Control Type Consumes 2 cells: Label cell plus Control cell Location of "Tooltip text" field Label cell contains "Description" Hover-help / tool-tip text displayed when hovering mouse over the Label cell Hover-help / tool-tip text displayed when hovering mouse over the Control cell
    Button Control cell only Control cell n/a n/a Tool-tip text
    ComboBox Label + Control cells n/a Yes Label cell Description nothing
    EditBox Label + Control cells n/a Yes Label cell Description nothing
    HyperLink Control cell only Control cell n/a n/a Tool-tip text
    Image Control cell only Control cell n/a n/a Tool-tip text
    ListBox Label + Control cells n/a Yes Label cell Description nothing
    Text Control cell only n/a n/a n/a nothing
  • 0   in reply to 

    This is great. Thanks for sharing your findings.