Forum Discussion

BrianDunk's avatar
BrianDunk
Qrew Cadet
3 months ago

Abort Form Save if Date Field outside of range?

I was wondering if its possible to create a rule that will not allow the user to save a form if a date field value is less than +14 days from the current date?  Also, could a message popup explaining the issue?

Thanks,

Brian



------------------------------
Brian Dunk
------------------------------

7 Replies

  • You can use form rules or validation rules, either or. I'd suggest just making a checkbox field that checks your date field against today and if the gap is less than 14 days check it off, then make a form rule or setup you validation rule when the box is checked and display a popup message/abort the save. 



    ------------------------------
    Chayce Duncan
    ------------------------------
    • BrianDunk's avatar
      BrianDunk
      Qrew Cadet

      Thanks Chayce,  one question.  I don't recall seeing the option to popup a message and abort the save.  Is that something that shows on Checkbox fields?

      Brian



      ------------------------------
      Brian Dunk
      ------------------------------
      • ChayceDuncan's avatar
        ChayceDuncan
        Qrew Captain

        This answer is slightly different if you're on new forms or legacy - but in the 'Actions' part of the form rule there are two things:

        1. Prevent Save - so this wouldn't pop up with the message until you hit save but the action for prevent save will have a text input for your commentary
        2. Display Message and you can pick the type (modal, notification, field) that will fire immediately when your condition is met. So if you trigger the rule on the checkbox changing to true meaning their entry is now wrong it'll pop up the message. 



        ------------------------------
        Chayce Duncan
        ------------------------------