The Form Tools forums are no longer active, but the old posts have been archived here. Please see the Help page on how to get help / report issues.

Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Failed query in ft_finalize_form / row size too large: SOLUTION!
First, to Ben: You are the man. FormTools rocks my face off.

Second: after an aggravating week of trying to figure out why my 167-field form wouldn't get to the "finalize form" stage, I tried something out randomly that did the trick, based partly on a reply I saw Ben give to someone else w/ this problem and 20 Google searches.

Caveat: I'm not a skilled php (and especially SQL) programmer, but I'm learning. I felt it was my duty to at least share with the rest of you what I did to overcome this problem, because I couldn't find this answer anywhere else. I hope it helps at least a few other people get past that stage.

Here's the error message I kept seeing after the Field Types page but before it got to Finalize Form:
Failed query in ft_finalize_form, /path/to/home/page/public_html/formtools/global/code/forms.php, line 238:
CREATE TABLE ft_form_8 (
PRIMARY KEY(submission_id),
col_1 VARCHAR(255),
col_2 VARCHAR(255), ... etc through col_166 VARCHAR(255)
col_167 VARCHAR(255),
submission_date DATETIME NOT NULL,
last_modified_date DATETIME NOT NULL,
ip_address VARCHAR(15),
is_finalized ENUM('yes','no') default 'yes')
Row size too large. The maximum row size for the used table type, not counting BLOBs, is 65535. You have to change some columns to TEXT or BLOBs

[end error message] = = = = = = = =

So here's what I did:
Step 1. change the default character set + collate from "utf-8" to "latin1" in this particular database I was using (I don't have any needs for international language in this instance; it may differ for you. If you expect non-latin characters, this solution will not work for you as far as I know.)
--Here are instructions if you have phpMyAdmin:
a. Log into your SQL database and go to the phpMyAdmin section
b. Click the database name in the upper-left corner at the top of the directory tree to'll look like: database_name(41) or something like that.
c. Click the "operations" tab
d. Scroll down to the bottom and choose "latin1" or "latin1_general_ci", then the "go" button

Step 2. open up '/formtools/global/code/forms.php' in an editor (I use Dreamweaver) and go down to line 235. Change the line to:

*do not forget the " or the ;
*also: my db type is InnoDB; yours may be different. I wouldn't change TYPE if you don't know what you're doing.

Once I did the above two steps, I was able to submit my 167-field form without having to break it up into 2-3 tables. Turns out the biggie was changing line 235 in the forms.php file. It may very well be that you might not need to do Step 1 above (changing default character set + collate), but I wanted to throw it in just in case.

I hope this helps others out. Once again, Ben: great job on FormTools!

Hey Prometheus,

Haha thanks! And thanks very much for the post - very clear.

The installation script should let you choose whatever charset you want, but I'm not totally sure it's possible to get that info from MySQL within PHP... (anyone?). I'll have to do a little digging on that.

But yeah, I'll be adding that in 2.0.2. Even if it can't be detected, it should at least provide the option under an "Advanced Options" section to let advanced users do this.

Also, relating to the "row size too large" problem is the database collation type itself. Form Tools uses InnoDB, but it'll be moving back to MyISAM. That'll also help resolve this sticky little problem.

Anyway, thanks very much!!! Smile

- Ben
Failed query here is a finalized form that is almost a large solutions by the junior member in this blog post. The thread is also joined in year 2010 with the particular aspect of law essay writing service that is to make the face tool with the personalized one.

Forum Jump:

Users browsing this thread: 1 Guest(s)