Setting image field by a form

Hey there! I have a form in my members area. I want to include that members profile picture on that form (profile picture is also present on the form page which has been uploaded earlier by member)
i can collect some other data by setFieldValue on texts buttons inputs etc. but i don’t know how to set it up for images.

One more Q.:
i want to limit image upload to exclude gifs and to set max size to 2MB. is that possible?

Hi Mert Ömer Ozbilgin!
As for your first question, you should connect the image component to a new dataset that will be linked to the relevant database (the one that contains the members uploaded profile picture). Then, on “manage dataset” you can set a filter as follows:

  • Field => ‘Owner’

  • Condition => ‘is’

  • User => Logged-in user.

That should solve the problem.

As for the second question, whenever you upload an image using an upload button the file still has its file extension (.png / .jpg / etc.). You can use an if/else condition to limit the file type using that logic.
About limiting the file size, look at the $w API guide here . It explains the way to access the file size value thus making it possible to limit it.

Best of luck!
Doron. :slight_smile:

If I have a similar requirement but if I am not a developer will I be still able to do this easily or do I need a developer with coding knowledge for this. Are there any tutorials or any video regarding this that can be helpful?

Very simple tasks can be done without any code, but in most cases, such functions do not fit the expectations of the requester/site-owner and at least also not the needs of the USER at the end.

So this for CODING-SKILLS are needed.

The more CODING skills you have → the better, more functional and much more flexible will be your site’s functions.

Unskilled non-developer can use connected datasets and the Wix-Property-Panel to generte their SIMPLE functions.

If it come to more complex tasks, you will need → CODE!!!

Also using predefined stuff, will have their boundaries.

So to answer your question, it depends on which expactations you have to your own SITE.

For bigger projects i would recommend you to hire a developer.
Programming can be very very time-consuming!

Agree to your suggestions. Will keep myself out of this and hire a developer when needed. I keep exploring wix and velo to check what it offers that I can bundle into my website and offer clients if I make any website for them. Thanks for sharing your opinion.