Custom field validation

Everything good now.

1 more question, is it possible to have a custom validation of a field? (Ex: Only numbers, minimum number of characters, etc)

2 Likes

Unfortunately, custom validation of a field isn’t supported in our app. I am sorry!

I agree that this option would enhance our app and we’ll try to think it over in our future updates. We’ll keep you in the loop here :slightly_smiling_face:

2 Likes

Hi guys,
I am about to transfer the forms from another platform to Elfsight but I found some shortcomings.
I suggest to have function to check the number of characters for text form for example if I set it to 10 characters, anything lesser or more than 10, the form will prompt error.
Another function is to pre-fill the form, for example I would like to request the user to key in the correct serial number for certain product which starts with some numbers or alphabets. For e.g. 1371??? , I hope this function can be added as well.
Thank you.

2 Likes

Hi @WOWGary :wave:

Many thanks for sharing your feedback with us!

We have a similar request to set the number of character for a specific field. I’ve merged your comment with this request. All the updates will be posted here :slightly_smiling_face:

Also, glad to tell you that you can pre-fill form fields using URL parameters. In this post you can find all the details - Form widgets: How to pre-fill form fields using URL Parameters

If any further questions come up, feel free to let me know. I’ll be happy to help!

1 Like

Hi Max,
I try your suggestion but I don’t understand where should I input this to?
For example > “mywebsitedotcom/contact/?first-name=John%20Doe”

Thanks.

Sorry for being not clear enough @WOWGary !

This option works only when you click on the element with a pre-fill URL or just opens such a link. For example, if you add this link (mywebsitedotcom/contact/?first-name=John%20Doe) to the custom button and click on it, you’ll be redirected to the page with the form, where the info from the URL Parameters (John Doe) will be automatically added to the corresponding field (Name and Surname).

If this option doesn’t work for you, please describe your use case in more detail :slightly_smiling_face:

It would be really helpful, frankly I think it’s common sense.

2 Likes

It’s an Order Form widget that checks the information users enter—like address, phone number, or coupon code—in real time by sending requests to an API. It should also check the output of the API call to validate the data, and if anything’s incorrect or suspicious, it pops up a friendly warning notification right away. That way, users can fix issues instantly and avoid failed orders or checkout frustration.
This kind of widget would make the ordering process smoother, more reliable, and way more user-friendly. I think it could be a huge win for both customers and store owners.

2 Likes

Welcome to the Community, @ra16at :waving_hand:

Thanks a lot for such a thorough comment!

The field validation option is definitely a great feature, which would be a nice enhancement for our app too.

We already have a similar request on the Wishlist. I’ve merged your comment with the related thread, where we’ll keep you in the loop :slightly_smiling_face:

I’m surprised there isn’t a feature in the widget that does not have a proof of age in the date of birth column. In case someone, like myself, is making a waiver form, there has to be someone submitting a form that proves they are 18 or 21+ over.

1 Like

Greetings and welcome to the Community, @Alex_Siles :waving_hand:

Thanks for sharing your thoughts with us!

I completely understand your point and agree that it would be a great addition. By the way, we already have a related request for the custom field validation. I’ve moved your comment to the thread, where we’ll keep you updated :slightly_smiling_face: