How to save images and few more fields to collection via six code?

Hi,
I have a situation where I need to save images along with name, phone number etc. fields to a collection using wix code. Name, phone number fields validations to be done using wix code before saving to the collection. How can I do this using wix code alone? Please post complete code.

Hi, greenmango318.

Hard to post the complete code when you didn’t specify the exact validations you want done on the Name and Phone # fields. IAC, one way to effect what you want would to be implement code in the dataset’s beforeInsert() method.

Here are a couple links for you:

From what I see there, if a validation fails, you can prevent the record from being inserted.

The validations I want are
For Name: only alphabets, no numbers.
For Phone: 10 digit numbers valid USA.
Hope this is OK to provide the actual

The validations I want are
For Name: only alphabets, no numbers.
For Phone: 10 digit numbers valid USA.
Hope this is OK to provide the actual

Hi,
We can’t write the code for you, you can hire someone to do that for you in the wix arena .
Check out this article about Validating User Input with Code.

Good luck :slight_smile: