In Cognito Forms how do I program a warning note to appear on the form if the selected order date is past a certain number of days?
This is for an RMA Form on an eCommerce website.
Web Applications Stack Exchange is a question and answer site for power users of web applications. It only takes a minute to sign up.Sign up to join this community
To show a warning note on a return merchandise authorization (RMA) form that only appears if the order was placed after the store's time limit for returns is, add a Date input field to the form and label it "Date of Purchase", then in the Date Field's Show Custom Error setting select "When" and add the following Custom Expression:
The -30 in the custom expression can be changed to any number of days that you want, such as -90 for 3 months or -365 for one year.
Then add whatever text you want to the Custom Error's error message such as "Returns are only accepted within 30 days after the item was purchased. Unfortunately if you submit this form your return will be denied."
Also in the Date Field Setting's "Range" setting you can leave the minimum value blank and type "Today" into the maximum setting so dates after today can not be accidentally selected.