Hello.
I’m currently working on a members-only page at https://www.swinghire.com/create-edit-my-instructor-profile .
Members can submit their info to populate a profile listing on this index page: https://www.swinghire.com/browse-instructors
My problem is this: After a member has submitted all the necessary data to their profile, they can go back and edit it. But when they do, any fields which they do not touch are then re-submitted as blank. Then their profiles just show blanks for those left-alone fields. So how can my members edit just some fields of their previously submitted data without the left-alone fields submitting blanks to the data collection?
Thank you!
Hi, I figured it out with the help of a Wix customer rep! (Julianne you are the best!) If anyone else stumbles across this with the same question, here is the answer that fixed it for me.
I needed to set the dataset on my " create-edit-my-instructor-profile " page to “read AND write.” Previously, I had it only set to “Write only.” Setting to Read and Write makes it so that any previously added submissions are still filling in the fields when the member clicks “submit” again.
BUT. Here’s the snag. I needed this dataset to have a filter for “owner = logged in user.” This is necessary so that members can only see their (and only their!) previously submitted entries. Otherwise, they’d be able to access other random member’s profile data from this page.
So what’s the problem you ask?
Well, setting the dataset to “owner = logged in user” requires the person on the page to have ALREADY received an owner ID within the Wix database system in order to read or write anything. And being able to write-in is important. So on their first visit to the " create-edit-my-instructor-profile " page, all the input fields were greyed out and in error mode. The visitor doesn’t have an owner-ID, so they have no permission to read+write anything yet.
Solution:
It’s a workaround. But it’s a workaround that works. I added a button at the beginning of the page which they are asked to click to start. It actually just connects to a blank boolean database field. But clicking it initializes that user’s presence in the system, thereby giving them an Owner ID. Thereby giving them permission to view a page of their own yet-to-be-given answers.
Now they can both add new info AND come back later to edit the same info without accidentally overwriting any fields. Huzzah!
You can find out about Wix Dataset Modes and Permissions through reading the Wix Support pages, like these here.
https://support.wix.com/en/article/about-collection-permissions
https://support.wix.com/en/article/working-with-dataset-modes-and-collection-permissions
There is also a Wix Members Profile Page tutorial that goes through the basics of what you are trying to achieve here too.
https://support.wix.com/en/article/corvid-tutorial-building-your-own-members-area
Also, depending on what code you are actually using, you can look at using the insert function here.
https://www.wix.com/corvid/reference/wix-data.html#insert
Also, in the related posts section on the right hand side, you will find this article that tells you about it too.
https://www.wix.com/corvid/forum/community-discussion/unable-to-create-a-members-only-page-that-can-save-new-data-into-database-as-well-as-allows-modifications-to-it-in-the-same-form-page
Posting guidelines:
Search Before Posting. Use the Forum search. There’s a great chance that someone has already solved the problem that you are facing. If you post a question that has already been asked and answered, your post may be locked. You might find the answer to your question by searching the Corvid documentation.