You are viewing limited content. For full access, please sign in.

Question

Question

Date Validation on Modern Forms Designer

asked on April 5, 2024

In LF Cloud using the new forms designer, I've tried limiting an end date to 0-14 days after the start date field using the built-in date validation; however, I can't get it to work. It will still accept dates that are 30 days after the start date.

I've also tried creating custom errors for "values not in range" but that doesn't work either. Is this an issue with the date validation or am I missing a step?

DateValidation.png
Screenshot 2024-04-05 143703.png
0 0

Answer

SELECTED ANSWER
replied on April 8, 2024 Show version history

You might find that using validation rules works better than using the built-in field validation. It would look like: 

Validate End Date as field with date on or after Start Date and Validate End Date as field with date before or on (another field containing Start Date + 14 days), Always.

 

In this example, Validation Date calculation is =Start_Date+14

2 0
replied on April 11, 2024

This worked great, thank you!

0 0

Replies

replied on April 8, 2024

The field settings variables are process variables so, like default values, need to be set before form load. If you want dynamic field changes while the form is being used you would need to use field rules. Which for now dont support the new field range modifiers.

 

@████████ method is perfect as well, just requires a hidden field. You could also make use of the new specific days in javascript to handle the max calculation but that is probably overkill for the intended use case.

2 0
You are not allowed to follow up in this post.

Sign in to reply to this post.