Hi John,
Yeah, this is actually an issue that's been around for a long, long time - and last night I just released 2.1.9 to better handle the situation.
Here's what's going on. MySQL tables have an upper limit of 65536 bytes for varchar fields, per table row. Form Tools lets you specify the field size as either VARCHAR fields (1 char, 2 chars, "Tiny" (5 chars), "Small" (20 chars), "Medium" (255 chars)) or TEXT and MEDIUMTEXT fields ("Large" and "Very Large"). I figured that the most useful field size is probably "Medium", since most fields will probably only need 255 characters - that's why it's the default for most field types.
The problem is that with larger forms, by defaulting the fields to 255 varchars can push the total row size over the limit. (I was testing, and on my local environment it was around 80-90 fields, myself).
With 2.1.8 and earlier, the error checking didn't account for this situation & there was a nasty little bug on the Edit Form -> Fields tab that made it LOOK like you just added a new field, however, the database table wasn't actually added to the table (because it couldn't be!). This resulted in a bunch of hideous errors, of which it sounds like you're familiar.
Form Tools 2.1.9 adds better error checking for this scenario:
1. it doesn't add the field unless the table was actually updated.
2. it displays an error if you reached the table limit.
This error checking was added to both the Edit Form -> Fields tab and the Add External form steps.
How to Fix
Fixing it actually isn't too tough. Weird though it may seem, just increase some field sizes to Large (TEXT), or reduce some others to Small or Tiny, depending on the data being stored in the them. It won't affect how the field looks or behaves; it'll just free up some Varchar space for use by your new field.
Alternatively, just create all new fields as "Large" field sizes (if the field type permits it).
Hope this info helps & sorry for the problems!
- Ben
Yeah, this is actually an issue that's been around for a long, long time - and last night I just released 2.1.9 to better handle the situation.
Here's what's going on. MySQL tables have an upper limit of 65536 bytes for varchar fields, per table row. Form Tools lets you specify the field size as either VARCHAR fields (1 char, 2 chars, "Tiny" (5 chars), "Small" (20 chars), "Medium" (255 chars)) or TEXT and MEDIUMTEXT fields ("Large" and "Very Large"). I figured that the most useful field size is probably "Medium", since most fields will probably only need 255 characters - that's why it's the default for most field types.
The problem is that with larger forms, by defaulting the fields to 255 varchars can push the total row size over the limit. (I was testing, and on my local environment it was around 80-90 fields, myself).
With 2.1.8 and earlier, the error checking didn't account for this situation & there was a nasty little bug on the Edit Form -> Fields tab that made it LOOK like you just added a new field, however, the database table wasn't actually added to the table (because it couldn't be!). This resulted in a bunch of hideous errors, of which it sounds like you're familiar.
Form Tools 2.1.9 adds better error checking for this scenario:
1. it doesn't add the field unless the table was actually updated.
2. it displays an error if you reached the table limit.
This error checking was added to both the Edit Form -> Fields tab and the Add External form steps.
How to Fix
Fixing it actually isn't too tough. Weird though it may seem, just increase some field sizes to Large (TEXT), or reduce some others to Small or Tiny, depending on the data being stored in the them. It won't affect how the field looks or behaves; it'll just free up some Varchar space for use by your new field.
Alternatively, just create all new fields as "Large" field sizes (if the field type permits it).
Hope this info helps & sorry for the problems!
- Ben