May 11th, 2010, 5:42 PM
(This post was last modified: May 11th, 2010, 5:44 PM by prometheus.)
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 (
submission_id MEDIUMINT UNSIGNED NOT NULL AUTO_INCREMENT,
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')
TYPE=InnoDB DEFAULT CHARSET=utf8
Debug:
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 open...it'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:
TYPE=InnoDB DEFAULT CHARSET=latin1";
*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!
:::prometheus
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 (
submission_id MEDIUMINT UNSIGNED NOT NULL AUTO_INCREMENT,
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')
TYPE=InnoDB DEFAULT CHARSET=utf8
Debug:
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 open...it'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:
TYPE=InnoDB DEFAULT CHARSET=latin1";
*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!
:::prometheus