Hi, Can anyone please advise on this code?
The code is to allow users to update their profile, which is unique to them. The top section up to line 16 worked fine and I was told to copy and paste and change some details (dataset) to have the same function on the site but for a different section.
Now I have done that, it doesn’t work.
Hi Ray,
You have a parsing error on line 33, also, if the collection that you’re trying to edit is the built-in members collection, then you can’t update it by code since it’s read-only, so you’ll get a permission error.
Also, don’t use the dataset’s onReady() functions inside each others, each one must be set inside the page’s onReady() function indivisually, not nested, move them out of each others and try the code again.
Hope that helped!
Ahmad
The dataset is one I created. Could you please explain more about the onReady bit?
Here’s everying you need to know about the datasets and their APIs
https://www.wix.com/corvid/reference/wix-dataset.html