How can I prevent a user from selecting or submitting an event from the dropdown menu of a field in a form if the date/time is less than 24 hours away from the current time?
Hi @Quynh-Tram,
Good question!
You can add a validation rule to the date/time field that is in your form view. Your validation rule could look like this:
You also could add instructions to your date/time input field in your form like this (won’t prevent them from submitting, but it will give them the message before they submit):
I hope this helps, and thank you for sharing your question!
Hi Leslie,
I forgot to mention that the event is a connection to another table, and I would like to reference the date/time in the “Event” table but the field/form being used is in the second table.
Basically, the events are in a dropdown for users to register to one, but if the event is less than 24 hours away, I want to prevent submission
Oh I see, thank you for additional info!
For connection dropdown field inputs in forms, you can add filters for which records are available for your users to choose from:
Since my example filter is set for “is after today” the filtered event dates available in the Live App form are in the future:
You will also want to ensure that the data table the connection field exists in has the display field in the table settings set for the date/time field:
If this doesn’t help, please feel free to reach out to our support team and they will be happy to take a look at your app and help you further. You can reach out to them via this form: Create Support Ticket