tabFormValidation

Home Forums Classic DFFS tabFormValidation

Viewing 2 reply threads
  • Author
    Posts
    • #29416
      Kasey
      Participant

        I have 5 number/% fields that in some cases need to add up to 100%. I have a custom function that when that is the case and they don’t add up to 100 it hides the save button and shows a message. The question is would it be possible to, on save, to show the dffs_statusBanner? I can use custom js to add the divs unless there is already a built in function to do that too?

      • #29420
        Alexander Bautz
        Keymaster

          I’m not 100% sure I understand what you mean, but the function you refer to is only used for the empty field validation and will auto-hide if you try to call it when there are no elements in the page with the class “dffs_emptyRequired”. This means you can fool it by adding an element in the page with this class – for example in your validation message and then call the function like this:

          spjs.dffs.dffs_statusBanner("Label", "Inner text");

          Alexander

          • #29447
            Kasey
            Participant

              Thank you! This is exactly what I was after. Just FYI, what I have now is a form where no fields are required but a ready flag is not editable until a specific list of fields have been answered. With this solution I created a button to check which fields haven’t been answered yet and show it in your banner. Kind of an on the fly user enabled field validator. Thanks again!

          • #29456
            Alexander Bautz
            Keymaster

              Good idea! – if you are able to post some code snippets to show what you have done I’m sure others would be able to use this approach.

              Best regards,
              Alexander

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