FORUMS


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:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Manually adding new field
#1
Had trouble automatically adding external form until I just started with the first 2 text fields with the idea of manually inserting the rest. So I'm now trying to manually add fields which I can do in the Forms > Edit > Fields Tab but these new fields don't show up in the Submissions View with the existing submissions and not even when I manually Add a submission.

Perhaps I've missed something? Any ideas?

Using fresh install of 2.1.8. Done a System Check and everything is good.

Have also tried this in the demo and new fields don't show there too. (It looks like the Add button is missing so can't try new submission)
Reply
#2
Hi John,

Welcome to the forums! Sorry to hear you had trouble adding your full form - may I ask, what step didn't work for you?

Regarding your current problem, this trips me up too. When a form is first added, a default "All Submissions" View is created containing all the fields that were initially in the form. That's what's used when viewing and editing the actual submissions. Any time you add new fields and want them to show up, you'll need to edit that View (or create another) to contain those new fields.

Hope this helps - and good luck with it!

- Ben
Reply
#3
Thanks Ben That worked and seems so obvious now.

(I'm creating it manually because it was at stage 4 that circles kept going round but nothing progressing even when waiting a long time.)

I now want to manually add Options to a Dropdown field and in reading through the documentation I get stuck trying to find the "Options Link". Edit Form » Fields tab but the only "Option" I can find is in the left hand menu "Option Lists".

Apologies but can you point me in the right direction again please.



Reply
#4
Hey John,

No worries - this isn't obvious, either!

What I'd do is click on the Option Lists section in the left nav. That section lets you manage your lists of options for use in radios/checkbox etc. fields.

There, create a new Option List containing whatever options you want - ordered however you want. (Don't worry about making it perfect: just add a few values so you can see how it works. You can always return to tweak the Option List later).

Then, on the Edit Form -> Fields tab, click the edit icon for the appropriate field (the penultimate column). A dialog window should appear. There, click on the second tab and for the "Option List / Content" field, select your Option List. After saving, it should all work properly now!

Let me know if you have any trouble.

- Ben

Reply
#5
Great, that works. Many thanks for taking the time to explain that.
Reply
#6
Hi Ben

Perhaps I'm having some sort of memory problem or something? I'm up to 93 fields in my form and seemingly I can't get past this. Once I add the field "whystudy2" I get this error message below and then delete it and sometimes the one before in order to kick start it again:

_____________________

ERROR

Error Type: System
Error Code: #304 — Learn more about this error.
Debugging:

Failed query in ft_process_form, /homepages/xxc/htdocs/xxx_forms/process.php, line 247:
INSERT INTO ft_form_1 (surname, first_names, gender, date_of_birth, religion, parish, address, home_phone, mobile_phone, your_email, present_school, futurechoices, other_college, if_yes_which_, guardian_one_title, if_other_put_here, initial_g1, surname_g1, guardian_two_title, initial_g2, surname_g2, emergency_contact_name, guardian_parent_email, ethnic_origin, residency_status, previous_country, as1, as2, as3, as4, as5, as6, v1, v2, v3, v4, v5, v6, disability, if_yes_give_details, extra_help, psychologist_report, other_information, subject1, subject1_level, subject1_grade, subject1_date, subject2, subject2_level, subject2_grade, subject2_date, subject3, subject3_level, subject3_grade, subject3_date, subject4, subject4_level, subject4_grade, subject4_date, subject5, subject5_level, subject5_grade, subject5_date, subject6, subject6_level, subject6_grade, subject6_date, subject7, subject7_level, subject7_grade, subject7_date, subject8, subject8_level, subject8_grade, subject8_date, subject9, subject9_level, subject9_grade, subject9_date, subject10, subject10_level, subject10_grade, subject10_date, subject11, subject11_level, subject11_grade, subject11_date, otherqualifications, whystudy2, submission_date, last_modified_date, ip_address, is_finalized)
VALUES ('s', 's', 'Male', '7 September 2011', 's', 's', 's', 's', 's', 's', 's', 's', 'No', 's', 'Mr', 's', 's', 's', 'Mr', 's', 's', 's', 's', '11 Asian or Asian British - Bangladeshi', 'Yes', 's', 's', 's', 's', 's', 's', 's', 's', 's', 's', 's', 's', 's', 'Yes', 's', 'Yes', 'Yes', 'Yes', 's', 's', 's', 's', 's', 's', 's', 's', 's', 's', 's', 's', 's', 's', 's', 's', 's', 's', 's', 's', 's', 's', 's', 's', 's', 's', 's', 's', 's', 's', 's', 's', 's', 's', 's', 's', 's', 's', 's', 's', 's', 's', 's', 's', 's', 's', '2011-12-07 18:20:43', '2011-12-07 18:20:43', '87.106.119.24', 'yes')
Reply
#7
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. Smile

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
Reply
#8
Tried deleting some of the earlier fields and adding the last three to make sure there wasn't an error in the final 3 fields being sent by my form. It worked and in adding back just one of the deleted fields it brought up the above error again. Any ideas?
Reply
#9
Hmm... I'm not sure. Are you still running 2.1.8, or did you upgrade? You may have to do a manual comparison of your database table to check over what columns are missing and delete them via the FTP interface as well.

It's not great, I know... but after something goes wrong in this regard, a manual fix is necessary.

If you're royally stuck on this & don't mind giving me access (phpMyAdmin + Form Tools admin login), I can take a look at it myself. Shooet me an email at ben.keen@gmail.com

- Ben
Reply
#10
Hi Ben

You were right about the field sizes. I had just been adding new field and mainly just leaving the default field size at Medium. I went through and changed all the appropriate ones to Small or less and Eureka! more fields could be added!

Form completed and now the form from CMS Made Simple is ready for live testing.

Many thanks for your help - very much appreciated.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)