Dynamic Field Tooltip

Home Forums Classic DFFS Dynamic Field Tooltip

Viewing 3 reply threads
  • Author
    Posts
    • #10901
      Kasey
      Participant

        Is there anyway via custom js to set the field tooltip based on the value of another field?

      • #10909
        Alexander Bautz
        Keymaster

          Hi,
          Add a rule on the field you want to control the tooltip with, and have it call a custom function “changeTooltip” in the “Run these functions / trigger these rules” field.

          Then add this to the custom js:

          function changeTooltip(){
          	spjs.dffs.data.tooltipObj.TheFieldNameYouWantToChange = "New tooltip text";
          }

          Alexander

        • #10951
          Kasey
          Participant

            Thank you! Can you use a function like this to add a tooltip to a Side-by-side field label if you use a div with an ID for the “Text or HTML”?

          • #10995
            Alexander Bautz
            Keymaster

              Yes,
              You should be able to add a tooltip in custom html if you inspect an existing one and recreate the “help icon code” – changing the “id” and adding a custom one in the “spjs.dffs.data.tooltipObj” as shown above.

              Alexander

          Viewing 3 reply threads
          • You must be logged in to reply to this topic.