Minim value form submission

Hi all,

I am building a form where on of the inputs by the user is a number. The minimum number that the user can submit will change based on the record loaded to the page. Currently the minimum can only be defined as a static number for all components it seems. Is there another way that this can be circumvented at the moment?

1 Like

Hi @TrendiMike :wave:

Can you tell us a bit more about your use case?

Would you want the input field to display the minimum number for that specific user for example or would you want to check that the user entered a number equal or above that minimum number before he can submit the form or both?

Hey @Joyce, thanks for coming back to me. Should have specified on my part: I am looking at the validation - e.g. restricting the user from entering a number smaller than the minimum specified which will change quite often.

You can do this with an html attribute on the input.

Create a new attribute called pattern

Use regular expression to indicate what the minimum value is.

HTML attributes can be bound, so you can set the condition in the regular expression based on what you need.

If you have a pattern on the input the form with check against that onSubmit.

@kevinwasie thanks for the reply. I was hoping there would instead be an option to use weweb formulas. @Joyce is there a plan to enrol that as a customisation in the near future?

@TrendiMike You can also just use the min attribute on the input.

Create an attribute called “min” on the input, and use the binding to set it to whatever you want.

1 Like

Hey @TrendiMike, no immediate plans but I’ve added your feedback to our user research so the tech team can review it :slight_smile:

Is it a priority for you or does Kevin’s solution work for you?

Hi @Joyce, I’ll come back to you on @kevinwasie solution very soon :slight_smile: But going forward I think it would be logical to have minimum and maximum as a formula control seeing how most other attributes for numerical input on the form are currently formula configurable.

1 Like

could it be that this function no longer works?