Pushing data collected using 123FormBuilder to WixCode DB

Hey guys,

Because we have received some requests about it, we made a tutorial on how to have 123FormBuilder submissions directly in the Wix Code database.

It does not require any other app integration or custom code written by you and the info is sent to Wix Code almost instantly.
But there are some must do’s to make it work:

  • after submitting the form, redirect the user to one of your Wix pages that contains the JS code we provide (the page could be existing or new; we called it ThankYou in the tutorial);
  • name the database just like we suggest in these steps: 123FormBuilder_formID;

Here is the GitHub link to the folder containing tutorial and needed JS Code: GitHub - 123formbuilder/wix-code: Pushing 123FormBuilder submissions to Wix Code databases

The code available on Github will be the one that we’ll update with future developments.
Let us know how it works, what you do and what you need. We’ll try to develop more.

I’ll update later this post with some examples made using the submissions. You are welcomed to do the same! :slight_smile:

Hi Dorina :slight_smile:

So I’ve attempted to perform this (based on your instructions) ---- but it seems that there may be a piece of the code missing? Perhaps a Backend data.js file/code? (I notice it in your screenshots, too — but there is no mention of it anywhere else). I’ve already tested it out ---- but have not been able to make it work. Let me know please :slight_smile: (I have a customer that is waiting on this update to continue to use 123Form vs building a brand new form with Wix Code)

Thank you!
Nayeli, Code Queen

(You can call or email me also)

Hey Nayeli,

I just tried again sending the data and it works if all the steps are followed.
The .js file is available in the GitHub folder: https://github.com/123formbuilder/wix-code/blob/master/wix-code.js
The full tutorial can be found here: https://github.com/123formbuilder/wix-code/blob/master/123FormBuilder-Wix-Code-Integration-Tutorial.pdf
Naming the database just like in the tutorial and adding the #WixCode ending (exactly like this, capital first letter in each word) to the redirect URL is mandatory, otherwise it’s not working.

We made an example : RSVP form for Housewarming Party and showing the attendants list. Just fill in the form, then check out the attendants page → you submission should show up.

Update on Nayeli’s comment:

  • all the steps and settings were correct (of course, she’s the Code Queen :))
  • but the trick was in the form’s settings: client had Request for approval option enabled, so only after he approves the submission, data is sent and it appears in the Wix Code Database;
  • if the submission is rejected, it doesn’t appear in the Database.

Silly question…are you supposed to create all of the fields in the database first? I didn’t see that step in the tutorial. If so, how should they be named?

Hey Jeff,

If you have your form in 123FormBuilder, all you have to do is to follow the steps. The fields will automatically appear in the database at the first submit, without you creating them there first. So by setting up this connection, you allow all new submissions from your 123 form to be almost instantly send to your Wix Code Database.
If you need the old submissions in there as well, you can Export them to a CSV file, from the Submissions section in 123FB, and then import them in the Wix Database (in the same collection where the new submissions are send).
Let me know if you have more questions. :wink:

@Dorina If I use Request for Approval , isn’t it automatically loads the default “approval” statement? I have tried to make it redirect to another page, but it isn’t possible. So this tutorial doesn’t work at all in this case. If only there is an option to modify the behavior on this kind of form. That’s unfortunate.

@andluism - So, I understand that for Request for Approval, you are using the options: Send request to the person who made the submission + Approve automatically when the user clicks on the link sent via email ? In this case, the data will be sent to Database just when that person click on the link in email to approve it. So, visitor filled in the form, clicked on submit, then received an email with a link. In the moment that link is clicked, the submission is approved and it’s send to the Database as well. I just made a test and it works.
PM me in case you have this scenario but data is not sent.

@Dorina Nope, that is not my scenario. I use the form to collect RSVP to an event. The admin is the one who should accept or reject the submission, not the user. The admin will get a link to the submitted form via email and they need to accept or reject it.

How is that in my scenario? Will this tutorial work? So just by having #WixCode at the end of the link, even without the form auto redirect to the “Thank You” page, the form input will be updated to the database once it is approved by admin too? If reject then it won’t be updated to the database?

@Andluism - If you follow the steps (use #WixCode at the end of redirect link and have the code snippet on that redirect page) than it will work like this: the admin will receive an email with the link to approve / reject - he will click that link → check out the form → click the Approve button → form will be submitted and the redirect will happen → data will be posted in the Database.
If Admin will Reject → the redirect will not happen → data will not be sent to Wix Code.
So, it is extremely important to: 1. have the redirect setting and 2. on that page have the code snippet.
Please send me a personal message or email in case it doesn’t work for you and we’ll debug it together.

@Dorina It’s not working. The form that I’m currently trying to modify is the one without approval request. It is a normal form. I have set it to redirect with #WixCode behind the link to the thank you page, put the js script there, and made the database using the name specified but with my own form number. I have triple check (more than triple I think), but it is still not functioning. How long do I have to wait before the data being sent to Wix DB? Where can I sent you a personal message?

It should happen instantly. Ah, I forgot to put my email in the previous message: dorina@123formbuilder.com
Please send me a message with the website URL, screenshots with the thank you page + code and the database name and redirect link. Thanks!

Hi Dorina, This is just what I have been looking for.
I have followed all the steps but it doesn’t populate the database. Is it ok for me to email you as well?
Thank you

Hey Robyn,
Of course you can also send me an email with the website URL, screenshots with the thank you page + code and the database name and redirect link. :slight_smile:
Just a few thinks to check before: make sure that after submitting the form, you check the Live Database - this is the one that gets populated. Also, please check the permissions for the database - it should be: Form Submission or have Anyone at Create & Update.
Looking forward to your email!

ok thanks Dorina, I have checked those things. permissions are fine and it hasn’t populated the live database. So I have sent you a email. Thank you for your help.

I followed the steps in the tutorial exactly, and it did not work. The URL at the ThankYou page when I tried it out looks like it did something, but when I checked the collection, nothing was there.
Does this work for a free starter 123FormBuilder account?

@ andluism and @robyn did you get it to work? If so, what was the issue?

Thanks!

@info: Yes, it should work for any kind of account, including the free one.
I just tried it again with one of my forms + websites and it worked.
It would be great if you can send me an email with the info → could speed up the process, maybe we notice a pattern. Thanks!

@andluism & @robyn - we are still trying to figure it out.

Thanks Dorina. I sent you the email with the information and screenshots. Thanks!!!

Does this same code work when testing the payment system? I have implemented the code inside the Thank You page, set up the DB with the correct form number, but I am testing the payment system to prevent actual purchases from being made. Will this still send the data to the database because if so I have not gotten this to work. I’ll email you with information and screenshots as well!