Saving to a MySQL database - Page 1 -...

User 2486186 Photo


Registered User
3 posts

Hi guys

I'd like to set up my form to save the results to a database. I've entered the correct credentials within Web Form Builder. I've made a new database with 9 fields, my form has 9 fields.

Do I need to match the field names in my database, so they are the same as what they are on Web Form Builder? Currently, when you complete the form you receive the error message:

Your form could not be submitted for the following reason(s):
Failed to store the data.

Thanks for your help in advance.

Kind regards
Adam
User 2147626 Photo


Ambassador
2,958 posts

Take a deap breath, this is an easy one :D

Delete anything you entered into your database on the server. Don't put in any fields or data. Start with a blank database. When you create your form, and you put in the fields on your form, then enter the database credentials the web form builder will create the needed fields in your database for you! How's that for cool? :D:D
Graphics for the web, email, blogs and more!
-------------------------------------
https://sadduck.com
User 187934 Photo


Senior Advisor
20,239 posts

Create the database but don't make any tables.;)
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 2486186 Photo


Registered User
3 posts

Awesome! Cheers guys - will give it a go now! :-)
User 2693618 Photo


Registered User
14 posts

Guys I really need to not have it create new fields. I want to connect it to my exisiting database. I made careful sure that the field names were exactly the same on mysql database as they were in the "Name" section of WFB. I know it captures the ip and all that and I was able to put that in just as it shows in the build file of wfb. getting that same error message. I checked the sql log in details are correct. I have existing data in the table so I don't want to delete it and rebuild if I can avoid that. But I may have to back up and then let it build them and just reload the data.. not sure. Any ideas here how to connect the data to drop into an existing database? This is critical as I have many forms to do like this. Thanks, Tina O'Connell - so far very happy customer!
Tina O'Connell
ScubaLessonsInc.com
Stuff4Scuba.com
User 103173 Photo


VP of Software Development
0 posts

Tina O'Connell wrote:
Guys I really need to not have it create new fields. I want to connect it to my exisiting database. I made careful sure that the field names were exactly the same on mysql database as they were in the "Name" section of WFB. I know it captures the ip and all that and I was able to put that in just as it shows in the build file of wfb. getting that same error message. I checked the sql log in details are correct. I have existing data in the table so I don't want to delete it and rebuild if I can avoid that. But I may have to back up and then let it build them and just reload the data.. not sure. Any ideas here how to connect the data to drop into an existing database? This is critical as I have many forms to do like this. Thanks, Tina O'Connell - so far very happy customer!

Form Builder is not designed to work that way Tina, but if that is something you need, you would have to make custom adjustments to the script files. For that, I do not have any instructions I can offer you. There maybe some others here that can offer some pointers though or possible solutions to make it work the way you need.
Learn the essentials with these quick tips for Responsive Site Designer, Responsive Email Designer, Foundation Framer, and the new Bootstrap Builder. You'll be making awesome, code-free responsive websites and newsletters like a boss.
User 2693618 Photo


Registered User
14 posts

I am all ears.. please.. anyone.. Thanks. That kinda stinks that it is not designed to do that.
Tina O'Connell
ScubaLessonsInc.com
Stuff4Scuba.com
User 2693618 Photo


Registered User
14 posts

Well I am a very smart girl.. figured it out all by myself. Just have to add these fields to make sure they map up..
_transactid_ , (VARCHAR, 40)
_fromaddress_, (VARCHAR, 255)
_flags_, (VARCHAR, 255)
_submitted_, (VARCHAR, 255)
_rowid_, (INTEGER, 40)

Once I added those fields in mysql.. it mapped up and dropped the data in just fine!
Just be sure the field names in the Name section in WFB and in your database and the field types are all EXACTLY the same. So you won't have any issues.

Thanks, Tina
Tina O'Connell
ScubaLessonsInc.com
Stuff4Scuba.com
User 2693618 Photo


Registered User
14 posts

BTW.. no adjustments to the script files were made.. only to the database fields.. just added those and wa la
Tina O'Connell
ScubaLessonsInc.com
Stuff4Scuba.com
User 10077 Photo


Senior Advisor
1,096 posts

I just now read the thread. I had the same issue and reached the same conclusion you did, Tina. However, I just created a table and let it form the fields to see what they are.
ASK ME ANYTHING
I provide personalized help for Coffeecup Users including personal or group training for Site Designer, Web Form Builder and more via Zoom.
Email me at support@uscni.org or call 865-687-7698.

Did you know that Web Form Builder can be used for both simple and complicated forms and that it's not limited to the default fonts and buttons? Take a look at a form we developed for WindowTinting.com.
https://forms.windowtinting.com/forms/w … ppingcart/

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.