Creating a Backup Collection

Hi guys,

I have a collection that authorised users can add and remove data from as part of their daily duties, but I would like to create a backup collection that only adds data, never removes it.

The process would look something like this:

  1. User adds multiple data fields and clicks submit
  2. The data is displayed in the user facing collection, but also copied to a backup collection (this is purely for auditing and keeping the main space clear of old submissions)
  3. The user can delete the entry on the user facing collection, but it remains in the backup collection permanently (so referencing won’t work as I understand).

The submission form, save and delete are all working fine. I’m just trying to find a method (a hook maybe?) to copy everything from the form to a second collection as they hit submit.

Any suggestions would be greatly appreciated.

I think this is what you will need, since you surely will work with Wix-Forms.

This will open you the door! (i think)

https://www.wix.com/velo/reference/wix-crm/$w-wixforms/onwixformsubmit

Yep, this is the foundation I was looking for, thank you.

I think I can figure calling the right data now, using let database = fields[0].fieldValue;

What I can’t see is a line to push it to a specific collection?

@davidbowring
This line you will have to create of course by your own …
Take a look into wix-data.

All I’m doing is piecing bits of code together until it works, but I don’t really understand all but the most basic of it. If there’s no examples of code for what I’m doing, I don’t stand a chance.

I don’t have the time or the inclination to learn the language from scratch, so what are my options?

So if you do not have the time to generate a working code for your site → then you will probably need someone who can do it for you.

You can find a developer, who can save you the time to make your wished function work…


…or look onto the profiles of existing user here in velo-forum, to pick the right one, if you think you have found the person who can do it for you.