Block users from submitting form if condition is not matched

Hi

I want user to be able to submit a form, only when a condition is matched.

So let’s say I have a formula field in airtable, that checks other fields like the address, and ih anything is missing, the field has the value “Adress missing. Please update your profile informations to submit this form.”

I would like to show this Error Message from the formula field when the conditions are matched, like the address is missing for example.
Ideally it would look like when you turned on “only submit once” and you can change the text by connecting it to the formula field which shows the error message.

Does anyone know if this is possible or is it rather a feature request?

Thank you!
Sergio

Hi Sergio,

I actually had to do this for a client. There is for sure some options with Javascript but since I am no-coder I am going to try to assist without code :slight_smile:

The problem is that for the field to be generated the record needs to be created already. But that only happens AFTER the form is submitted. So wat you can do is the following:

  • open the form in a modal and ask the questions. Make sure that the form is an action button for “add record”. You might have to start this form from a list block.
  • The submit button needs to open the list-details of the newly created record. Lets call this page: “summary of submission”
  • The “summary of submission” page should show a summary and also the formula field if anything is missing. The conditions for this can happen in a formula field in airtable.
  • Make an action button on the page that is red saying : missing data and one that is green saying confirm. The green can be a one click update action. The red one should do nothing. Make the buttons conditional (if you have business plan) or duplicate the block and make 2 versions. 1 with green and other with Red with a conditional filter saying : If the formula field does not say : “all data complete” , show the red. Same for green if it does show all data complete.
  • Add in both also an edit record button so they can fix their mistake.
  • Once the green button is pressed. You can visualize it in your dataset as a “checkbox” field that validation is completed through the one click update action button.

If there are more difficult validation checks required like bank account checks, pulling in location data from adress or other API calls you might want to add in a make.com automation to handle them. The proces remains mostly similar but instead of a one-click update you open an URL to a webhook. (but that is a whole different ballgame for now)

Hope this helps