If i try to use a key like "NameOfCompany" I get an error about "invalid key name". No problem, I change to all lowercase letters. But, once i fix the key name and click done, all the fields I created before are lost. By this I mean if I am creating a form and add 10 fields, then on the 11th field I screw up the name and have to fix it, after I click done ALL the previous 10 fields are gone and I have to start over.

Any ideas what the problem is?

Thanks

CommentFileSizeAuthor
#5 webform_validation.patch3.13 KBquicksketch

Comments

sgriffin’s picture

This is a duplicate of http://drupal.org/node/166764
The problem isn't your keyname, as you can start over and use that key right off the bat successfully.
I think there are only so many fields you can add at one time.
Not sure, the latest version of webform is very buggy.

Chichee’s picture

I, too, am having a problem but it's not because I've entered too many fields. Here are the problems I have with the module:

1) Doesn't save the Confirmation text or the Form Submission email even though it says it does.
2) When I create a field and click Add, then click Submit to save the field to the form, no field is saved.

This happens with only one field so number of fields being added at one time aren't my issue as others have described.

Chichee’s picture

I checked the logs and see that Webform is through lots and lots of errors. I've uninstalled it for now and will research the installation problem later, which I assume is the reason the form wasn't working as in my prior post.

davemybes’s picture

Version: 5.x-1.4 » 5.x-1.6

I can confirm this behaviour in the latest 1.6 & 1.x-dev (Oct 17) versions. It has nothing to do with the number of fields, and can easily be reproduced by doing the following:

1. Create a fieldset.
2. Create a second fieldset, but use a capital letter in the Field key name.
3. Click Done and you get an error about the Field key name.
4. Change it to all lowercase and click Done again.
5. The fieldset is created, but the first one is now gone.

The only way around this is to be very careful with Key names, or you will lose your entire webform.

quicksketch’s picture

Status: Active » Needs review
StatusFileSize
new3.13 KB

Thanks for the continued patience on this issue. I've committed the following patch to webform 5.x-dev, which I believe corrects the problem. It also adds more descriptive help text and error messages, and prevents duplicate form keys.

Please test out the latest version or apply this patch. If it fixes the problem, mark as fixed.

davemybes’s picture

Version: 5.x-1.6 » 5.x-1.x-dev
Status: Needs review » Needs work

Thanks for the quick response to this issue, quicksketch. The patch does stop all the previous fields from disappearing. However, whatever component you create will replace the highest weighted component. e.g. I had a fieldset set at -6, then I created a textfield at weight 0 (using a capital letter in the Key name). An error occurs, I make all the letters small, and submit successfully. However, the new textfield has now replaced the fieldset. It keeps its weight of 0, and any children of the fieldset are still shown indented, as children of the textfield. When you edit any those children, however, they are shown as children of Root.

quicksketch’s picture

Interesting... I'm looking into it.

quicksketch’s picture

Status: Needs work » Needs review

I posted another shot at fixing the problem. I haven't been working on webform for so long the code style problems prompted me to fix a bunch of lines, so I don't have a patch to post. Could you try out the latest dev version or DRUPAL-5 branch and report if the problem is resolved?

davemybes’s picture

Status: Needs review » Fixed

The problem appears to have been solved. Thanks, quicksketch!

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.