Validation of two fields

I wonder if it is possible.
I have two fields: 1 dropdown and 1 date. On a click on the button I would like to connect those 2 fields and check if the values make sense.
Details:

  1. On dropdown user selects the race which they want to participate: running 1k, 5k, 10k
  2. On Date field user selects the date when event happens

If user selected 10k race, selected tomorrow as a date and then clicked the button, error message should be shown.

I know I could probably do it via conditions during the data selection, but I’m curios exactly about validation when button is clicked. Is it possible somehow? Thanks

I’m assuming you have races in the database with race type (1k, 5k, etc) and date?

When they click the button add a workflow. Then on the workflow add an “Only When Condition” saying “Do a Search for races where race type = dropdown 1’s value and data = date picker’s value then add :count = 0” This is checking if there are any races that fit the race type and the date selected by the user.

Then in the workflow add an action to show an error message or whatever you want to happen. For error messages I suggest installing and using the AirAlert Plugin by Airdev.

1 Like