Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Rule to limit a date from being selected

Gabe Belknap
Contributor
November 6, 2020

HI folks, hope all is well.

I am building a confiform intake, and one of the fields definitions i am using is a date, Field name is RDD. 

Is there an opportunity to add a rule, and what would that rule look like, to limit someone from picking a date in the past and restrict them from picking a date that is less than 7 days in the future?

Thanks so much

 

1 answer

1 accepted

0 votes
Answer accepted
Alex Medved _ConfiForms_
Community Champion
November 6, 2020

Absolutely

Just add a ConfiForms Field Definition Rule with validate action

Screenshot 2020-11-06 at 15.44.33.pngScreenshot 2020-11-06 at 15.44.42.png

Condition is set to 

mydate:<=[yesterday] OR mydate:>[today]+7

Based on shortcut functions we can use for dates in filters: https://wiki.vertuna.com/display/CONFIFORMS/ConfiForms+Filters 

Screenshot 2020-11-06 at 15.44.47.png

Gabe Belknap
Contributor
November 6, 2020

Thanks Alex,

This field isn't always required, but when it is the date must follow that logic.  Is there anyway to accommodate that?  With the logic provided, it appears to work but makes the field mandatory.

Thanks in advance. 

Alex Medved _ConfiForms_
Community Champion
November 6, 2020

Well, change the condition to handle that... into something like this may be:

(!mydate:[empty]) AND (mydate:<=[yesterday] OR mydate:>[today]+7)
Gabe Belknap
Contributor
November 6, 2020

Thanks Alex!!!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events