Rules on form submission on date field

Hi there!

I’m trying to set a rule for an ordering form alike, where I want to not allow submissions if the:

  • date is in the past.
  • not allow submissions with the date of the current day, if the order is placed after a certain hour (eg: 9:30AM).

How can I achieve this?

I’m completely lost if it’s with permissions, ir I need to do something in Airtable or if it should be solved through Custom code.

Ty!

@Artur When Softr dispatches events related to form submission, is it looking at return values from handlers? That seems like the way to make something like this work.

Not yet but we do plan to extend to control the submission of the form via function. Sort of prevent submission if not happy with input…

Does that apply to both of my questions?
Ty both!

Hey @asc570, welcome!

Here is what you can do

If the form is only available for registered users, then you can use airtable fields to validate when the form should be available.

Simply make an airtable formula field that shows true or false whether the conditions in a date field called ‘current time’ are met.

Then on your soft side, you will show or hide the form, based on one parameter field from the current users’ session or a custom list-details block, you can follow this thread to complete this task: