MySQL Table Creation - Post ID 262714

User 2838950 Photo


Registered User
4 posts

The form that I have created fails to create the table in MySQL. The reason is that it has a high number of fields that are all declared as varchar(255) by WFB and so is exceeding the row length. Where are the settings so that these can be changed to a more appropriate length? If there isn't one where in the code can I alter them? The error file is attached.
Attachments:
User 187934 Photo


Senior Advisor
20,271 posts
Online Now

In the form builder click on the element you want to adjust. Then select the Properties tab and adjust the length for the chosen element.
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 2838950 Photo


Registered User
4 posts

Sorry but that does not work. For most of the elements there is no choice as to the length of it, even with the ones that there is WFB ignores it and makes the length 255 when creating the mysql table. For instance 'firstname' is set at 25 but WFB sets it at varchar(255).
User 187934 Photo


Senior Advisor
20,271 posts
Online Now

Did you create the table before the form or did you let form builder create the table?
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 2838950 Photo


Registered User
4 posts

Contacted support - WFB will always declare fields to MySQL as VARCHAR(255), with a few exceptions. Even a tick box will be 255 characters long. If you have a large form then the row length for MySQL will be exceeded. There is no way to overcome this unless you go into the php coding.

Having said that I have managed to get my form working. I did this by reducing the form fields until WFB created the MySQL table. This will set up all the fields on the smaller form. I then went into MySQL and reduced the VARCHAR()'s to sensible lengths. Then I increased the form fields and ran the extended form. This added the new fields as they were used (does not add all the new fields). These I then reduced in length within MySQL. I did this a third time and now have a working form.

I am sure that there are better solutions but at least it got me going. Now of to learn about php. :)
User 187934 Photo


Senior Advisor
20,271 posts
Online Now

What's the problem with them being 255?
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 2838950 Photo


Registered User
4 posts

see error file above
User 187934 Photo


Senior Advisor
20,271 posts
Online Now

Eric Rohloff wrote:
Did you create the table before the form or did you let form builder create the table?
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

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.