Show the value from this field above the tabs

Home Forums Classic DFFS Show the value from this field above the tabs

Viewing 4 reply threads
  • Author
    Posts
    • #13575
      Keith Hudson
      Participant

        I’m using the setting on the Misc config page called “Show the value from this field above the tabs” to display the value of a status field (ReadyToSubmit) above my new form.

        If the user changes the value of the ReadyToSubmit field, the display above the form does not change until the user clicks one of the tab selectors to select a different tab. Causing the tab selection to change on field change using a rule does NOT change the value displayed above the form.

        Is this a known bug? I’m using Backend v4.4.1|CSS version: 4.16 / 4.16|spjs-utility version: 1.267. I’ve looked at the change logs but don’t see it listed as something that has been fixed since v4.4.1.

        Is there perhaps a quick fix I can implement in the Custom JS section?

      • #13590
        Alexander Bautz
        Keymaster

          Hi,
          I have changed this in the upcoming release so it will change when the field changes and not on click of the tab. In the meantime you can add this to the Custom JS to fix it:

          spjs.$("#dffs_ReadyToSubmit").on("change blur",function(){
          	spjs.$("#formCustomLabel").html(spjs.utility.getFieldValue({"fin":"ReadyToSubmit"}));
          });

          Please note that this example uses the “ReadyToSubmit” field so if someone wants to use another field this name must be change.

          Also note that you need to set up the “Misc tab setting” in addition to adding this code snippet.

          Alexander

        • #13677
          Ian Patrick
          Participant

            Hi Alexander,

            Not sure if this is a similar issue. I’m using a field name in a Heading and it only updates the Heading value when the item is saved. Would there be a similar fix for this issue.
            Many thanks

            Ian

          • #13682
            Alexander Bautz
            Keymaster

              Hi,
              There is no easy method for doing this without inserting a custom placeholder in the heading, and adding a custom change event on the field like described above.

              I will address this in the next release, but if you need it working now you can add this wrapper around your “heading text” like this:

              This is the value in the field FIN: <span id='custom-header-text-FIN'>{FIN}</span>

              and use code like this in Custom JS:

              spjs.$("#dffs_FIN").on("change blur",function(){
              	spjs.$("#custom-header-text-FIN").html(spjs.utility.getFieldValue({"fin":"FIN"}));
              });

              Change FIN with your field name.

              Alexander

            • #13685
              Ian Patrick
              Participant

                Hi Alexander,

                This solution works fine. Thanks for the solution.

                Kind regards
                Ian

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