Dynamic Tool Tip

Home Forums Classic DFFS Dynamic Tool Tip

Tagged: 

Viewing 4 reply threads
  • Author
    Posts
    • #20758
      Kelly Turdanes
      Participant

        Hi Alexander,

        Is it possible to make the field tooltip dynamic?

        Thanks.

        Kelly

      • #20765
        Alexander Bautz
        Keymaster

          Yes, you can add this to the tooltip placeholder:

           {var:myCustomTooltipVariable}

          Please note that you must use a single whitespace before the first { to bypass the JSON string parser – if not it will be throwing an error – I’ll get this fixed in the next release.

          Then you can update the variable myCustomTooltipVariable in your Custom JS.

          You can also use field values from the current form by using the fieldinternalname in curly braces like this:

          This is the value in the Title field: {Title}

          Alexander

        • #20781
          Kelly Turdanes
          Participant

            Cool how about updating the tooltip’s content based on the selected value of the field?

            Thanks.

            Kelly

          • #20797
            Alexander Bautz
            Keymaster

              If you mean to change the text based on for example a status, you must create a variable like this in your Custom JS:

              var myCustomTooltipVariable = "Original text";

              Then create a rule to trigger on change of the field you want to use to change the tooltip text, and set it to call the custom function in your Custom JS. Set up the function like this:

              function changeMyTooltip(){
                  var status = getFieldValue("Status");
                  switch(status){
                      case "Not started":
                          myCustomTooltipVariable = "A tooltip text suited for this status";
                      break;
                      case "In progress":
                          myCustomTooltipVariable = "A tooltip text suited for this status";
                      break;
                  }
              }

              This will update the tooltip text based on the columne named “Status”. Use the variable in the tooltip textarea like described in the comment above (keep in mind the single whitespace before the first curly brace).

              Use this as a starting point and let me know if you have any questions.

              Alexander

            • #20808
              Kelly Turdanes
              Participant

                Thanks so much. I’ll give it a try.

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