How to force a date to be less than 90 days in the past in a Record Producer?

htank66
Kilo Contributor

Nothing special with schedules or anything, just straight up no further than 90 days in the past.  If the user tries to make it a date that is further than that maybe a pop-up tells them it is not possible and clears the field?  Unless there are any other ideas or solutions.

Thank you in advance!

10 REPLIES 10

htank66
Kilo Contributor

Yes this is true.  The problem with the onChange is the user can still submit the form even though the error is showing.  I dont want that to happen.

Ah i see.

Then make that field mandatory. And on error, clear the field. Then user has to enter the data before submitting.

htank66
Kilo Contributor

Gotcha! how to I clear the field on error?

You can clear the error by using

g_form.hideErrorBox('YOUR_FIELD');

Mark the comment as a correct answer and also helpful once worked.

htank66
Kilo Contributor

find_real_file.png

I have added a screenshot... the error does not appear at all for any date that is put in the field.  I am completely lost as to why this isn't working.