Webform is only allowing me to create 10 form components. If I create any more than that the most recent ones disappear once I select "save". I can't find anywhere to set the number of components allowed on a given form.

CommentFileSizeAuthor
#4 db3.png97.72 KBfuquam
#3 db1.png98.44 KBfuquam
#3 db2.png99.23 KBfuquam

Comments

fuquam’s picture

Version: 7.x-3.11 » 6.x-3.11
quicksketch’s picture

There isn't any inherent limit to the number of components in a Webform. I've known forms to contain over 400 components (though I don't recommend that). Could you check your database and see what the Component ID (CID) is in the database in the "webform_components" table? I'm curious if the ID is still incrementing after each new component or if the latest component always has an ID of 10.

fuquam’s picture

StatusFileSize
new99.23 KB
new98.44 KB

The cid is still incrementing. I attached two screen shots. The first is nid 11 which is a web form used as a contact form. I think there is a problem with the weight assignment because when I create a new component (radio select) which I want on the top with a weight of "0" instead of shifting the weight assignments of the other components it rewrites the cid. In screen shot 1 notice cid 19 (name) has a weight of "0". Screen shot #2 is after I created a new component for the top of the form, cid 20 (mailing_list) which is a select. Instead of assigning cid 20 a weight of "0" and adjusting the other cids weight assignments it seems to have just given cid 20 a weight of "0" and deleted the current cid that was assigned a weight of "0" which in this case was cid 19 (name). I'll shuffle the weights around manually and leave room for "0" in the database for now.
Thanks for the response. Let me know what you think.

fuquam’s picture

StatusFileSize
new97.72 KB

OK maybe I'm totally off. I made sure there was no cid with a weight of "1" so I create a text field and put it where the "1" weight would be on the form. I attached another screen shot. I thought that would work but it added cid 21 witha weight of "1" and deleted the cid that was assigned a weight of "0". I tried creating 2 new components and saving but the form will only let me keep 10 components for some reason. Is it possible the weight assignment only goes to "10"?

quicksketch’s picture

The Webform "weight" column is a smallint, so it can hold up to 32,000 different weight values which should be enough for anyone. I think there must be some custom code on your site that is implementing hook_webform_component_insert or *_presave that is intentionally deleting old components when you add a new one. I've never seen anything like this before, so my guess is that there is some custom code that is explicitly deleting component from under you.

vernond’s picture

Are you using a standard Drupal installation, or a custom distribution? Do you have any webform_* plugins installed?

quicksketch’s picture

Status: Active » Closed (fixed)

Closing after lack of activity.