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

Question

Question

Forms Date Constraints

asked on September 20, 2024

Hello, I have a Laserfiche form which has are two tables with date fields. Each table can have multiple rows.

The first table is called Travel and the date field variable of that table is called Date. The second table is called Cost_Distribution and it has two date fields, the first field's variable is Start_Date and the second field's variable is called End_Date.

How do I code it to prevent the Start_Date field from being able to select a date prior to the first row Travel table's Date field? I also need the End_Date field to be limited to the last instance of the Travel Date field.

 

Thanks

0 0

Replies

replied on September 23, 2024 Show version history

Hi Michael,

If you are using classic form designer, this is quite difficult to prevent the date selection based on the other variable's value, because the datepicker is from 3-rd party, it's hard to customize it to only allow a specific scope of dates. If you wants to validate if the date is valid or not, Forms use parsley js to do frontend validation, you have to write your own validators and apply it to start_date and end_date fields. 

In the new designer, we are working on a feature to limit the date selection to only specific dates, and support reading the scope from other variables, this feature id is 484964. It's still under development and can be ready in next release.

 

0 0
replied on September 24, 2024

Correct, this would be much easier in the new designer. The feature exists in cloud, and will be coming to self-hosted in v12. The feature is documented here for cloud https://doc.laserfiche.com/laserfiche.documentation/en-us/Default.htm#../Subsystems/ProcessAutomation/Content/Forms-Current/Form-Fields/Date-and-Time.htm?Highlight=date%20fields

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

Sign in to reply to this post.