Hello everyone,
I’m developing Wix site and have trouble inserting/updating records in two database collections, after “Submit” button is pressed. Let me explain my problem:
I have “Member profile” Dynamic page. On that page the logged user can add/modify user information, upload multiple images. For user information I have database collection called “MemberInfo”, for user images - database collection “MebmerImages”. The latter collection has reference field “Id” which coresponds to “Id” field in “MebmerInfo” collections. The relationship is One-to-Many - one user can have multiple images.
Here are my questions:
- How can I update data in “MemberInfo” collection and along with that insert record in “MemberImages”, after “Submit” button is pressed?
- What about the case, when the user fill the form for the first time and at the same time upload an image? In this case, I still don’t know the Id of the record in “MemberInfo” collection.
- I have another question - in the same page I want to show all images of the current user in a gallery element. If the user does not have image/s - nothing should be shown. If the user has image/s then, they must populate the gallery. After the user upload new image and submits it - the gallery must be refreshed. How can I achieve this functionality?
I have some backend dev experience with .NET language and I can code all of this in C#, but I’m new to frontend developing and Wix developing, in particular. I know that I should use Javascript to achieve what I want and I’ve searched a lot about my questions, but nothing seems to be shared about this particular topic. It turned into a vicious circle for me. So, I will be very grateful if someone can help me or explain to me what should I do.
Best regards!
Ivaylo