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: https://github.com/123formbuilder/wix-code
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! :)
This is an old post from 2018 and being closed.
Plus, there is a tutorial file from 123FormBuilder that you can use.
https://github.com/123formbuilder/wix-code/blob/master/123FormBuilder-Wix-Code-Integration-Tutorial.pdf
Or use their own app.
https://www.123formbuilder.com/docs/how-to-add-forms-to-wix-with-the-123-form-builder-app/
https://www.123formbuilder.com/wix-forms/
https://www.wix.com/app-market/123formbuilder/overview
Or better still, get using their own API.
https://www.123formbuilder.com/docs/apidocumentation/
https://developer.123formbuilder.com/api-v2/
As this is a 123FormBuilder issue, then you should be contacting their own support and asking them how to fix it, as it is not a Wix issue as it is from a third party.
From their own support pages....
akash says: June 12, 2019 at 5:29 am I am using 123 form builder in Wix, so guide me that how to get user input data from the form one by one. (I need to pass that data to external API) Julia says: June 13, 2019 at 2:36 pm Hello! You will need to create a script which have cURL request php. Kindly note that we do not offer assistance creating scripts, however, here is a php script as an example to guide you: https://www.123formbuilder.com/docs/123formbuilder-api-php-example-script/ Thank you!
Please add a new forum post with a link to refer back to this post if help is needed.
hello, i followed all the given instruction but it give me this error in console on thankyou page
Failed to load resource: the server responded with a status of 400 (Bad Request)
Wix seems to have changed the rules for naming a database collection. The collection name cannot start with a number. What was recommended by the Wix support team was to use an underscore for the first character of the collection name. As such, would the indexOf function need to now be “_123FormBuilder...”. If so, will the integration code still be functional?
thanks.
Greetings,
I've been trying to follow along with this and got this code from GitHub. As instructed, I put these lines of code, https-functions.js in a folder in the Backend. The lines at the bottom with the ** at the beginning are the ones throwing errors; responseOptions & badRequest are undefined. Where/how do I define them or is there something else I must do which will solve the problem?
Thank you, Ken
import {created, badRequeqt} from 'wix-http-functions'; import wixData from 'wix-data'; export function post_submit123FormData( request ) { let responseOptons = { "headers": { "content-Type": "application/json" }, "body" : null }; return request.body.json() .then( ( body ) => { if ( body.collection.indexOf('123FormBuilder') === -1 ) { throw new Error( 'Invalid Request Source.' ); } return wixData.insert( body.collection, body.data ); }) .then( ( result ) => { ** responseOptions.body = result; ** return created( responseOptions ); }) .catch( ( error ) => { ** responseOptions.body = JSON.stringify(error.message); ** return badRequest( responseOptions ); }); }
@Patrick, nope.
Are we supposed to add any code on the thank you page?
Dorina, I just tried to email you but I got a failed delivery notification back. Whenever I test the form (on my phone or computer) the data comes through immediately, but when someone in the general public submits the form, the data doesn’t come through. Do you have any suggestions? I checked everything you mentioned above.
@Nick, sorry for the late reply. Just seen the notification! Indeed, there was a problem with the Payments and the New Editor, but we've rolled out some fixes. The submissions appears in the Database just after the payment was completed and we've added a new column with the amount. If the payment is not completed, the submission is not sent to the database. You can duplicate the form, switch it to the new Editor and make a test. If you still encounter problems, please send me an email with details, so we can further look into it ;). Thanks!
So if you were to update to the new form editor 123FormBuilder has just released, it looks like you will have problems with collecting the form data. I was unable to collect form data and had to revert back to the older editor. Just letting everybody know as of today!
After the code was updated on GitHub, the following code now allows for sending payment enabled form data to databases :) Mega thank you! I don't know how y'all do it but this is super cool!
To clarify my question... I need to query and filter the 123FormBuilder collection when someone logs into my site as well as copy the data in the 123FormBuilder collection into another collection when they log in for the first time. However the following code doesn't work:
Note: userEmail is defined as the current user's email from login...
$w("#dataset123Form").onReady(() => {
$w("#dataset123Form").setFilter(wixData.filter()
.eq("Email", userEmail) // <==================== Doesn't Work
)
.then(() => {
let currentApplicant = $w("#dataset123Form").getCurrentItem();
if (currentApplicant === null) {
wixLocation.to(`/how-it-works`);
} else {
wixLocation.to(`/free-member-term`);
}
});
});
//Another example.....
let currentApplicant = $w("#dataset123Form").getCurrentItem();
var ApplicantName = currentApplicant.$("[id=Applicant Name]"); <============= Doesn't Work
var FunFact = currentApplicant.$("[id=Tell us a Fun Fact about you]"); <========= Doesn't Work
//etc........
It works without enabling payments Dorina! I don't know why it doesn't when having payments enabled but I'm sure it won't be too hard to figure out :)
How do you reference the fields in the 123FormBuilder db collection since the fields are named after the form question? For instance, one of the fields in my 123FormBuilder collection ended up being called "[Do you have a website?]" with a field ID of "Do you have a website?" when it imported after a form submission. I was not aware that field ID's could have spaces
So this means that it has to do with the payments part. We'll look into it next week, hopefully. Have you tried it without payments? Disable the payments and make a submit --> send me an email about it. This will help us find faster the problem --> because if it works without the payment --> than it's because of the payment. If your form doesn't work without the payment, then we have to investigate more and see what's causing the failure. Thanks Nicholas!
So unfortunately it still doesn't work for me, I just replaced the code and still no population of the relevant database. Is there any more information that you need to inspect?
works for me too now. Thank you for all the hard work and fast response!!
It worked! Thanks!!
@andluism, @robyn, @info --> we managed to find the problem, thanks to your examples!
So we rolled out a new code for the thank you page. We have updated the GitHub documentation and script, so feel free to copy-paste the new wix-code.js on your thank you page.
@Nicholas - thank you for the email with details. The problem you encounter may have something to do with the payments part, so we'll investigate this as well.
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!
Thanks Dorina. I sent you the email with the information and screenshots. Thanks!!!!