Just tried to upgrade from RC 3 to RC 4 and all of my old webforms show up empty, with no form fields or input boxes. Creating a new webform, drupal lets me go through the motions, but results in same.

Comments

gdip’s picture

I experience exactly the same with RC4.

jdw23’s picture

Yep. Same here.

pal_ur’s picture

Ahhhh... There are all the fields, but they are "hidden"-type fields...

gdip’s picture

Just updated to Drupal 4.7.0 - the problem still exists (hidden fields).

njvack’s picture

Note that when I comment out the line (near 877 of webform.module)

     // Add a theme function to each component
      // $form['submitted'][$component['name']]['#theme'] = 'webform_component_'.$cid;

The form fields show up again. Something seems to be wrong with the theme function...?

pwolanin’s picture

look at the recent CVS messages- for form.inc. I think this is a Drupal core issue, not a webform issue:

http://drupal.org/cvs?file=/includes/form.inc

pwolanin’s picture

Ok, I'll revise the above. The changes in the core forms.inc seems to have revelealed a problem in webform.module.

Clearly something is wrong, since the only fields showing up on my test site after a 4.7RC3 -> 4.7.0 upgrade are fields with multiple values to select like the radio buttons or check boxes.

njvack’s picture

Webform is setting really odd values of #theme for the components of a webform... such as 'webform_component_1135114890'.

I think the problem is that there's no function called theme_webform_component_1135114890(), and that it does something defaultish.

Do you really intend to set a custom theme for every form component?

pfaocle’s picture

Confirmed with 4.7.0 here, too. Commenting the line njvack mentions seems to fix. Posting so I can keep tabs on this issue.

silurius’s picture

Affected here also after upgrading today. Posting just to keep this discussion on my radar.

quicksketch’s picture

Thanks for the bug report. I commented out the line as njvack suggests and committed it to 4.7 and HEAD. I haven't heard of anyone using this functionality quite yet, so I hope this doesn't cause a problem for anyone. I think making sure webform works for new users is most important. If anyone finds a solution for permanently fixing this, please post!

silurius’s picture

Sorry to clutter up this thread with newbie questions, but what side-effects might occur as a result of commenting out that line?

Oh and even after commenting it out and overwriting, the problem remains for me.

pal_ur’s picture

I haven't heard of anyone using this functionality quite yet, so I hope this doesn't cause a problem for anyone.

Thanks for correcting, it helps me too. Are you planing some modifications in this module? I've try create two or three big questionnaries with them, but it was no easy, and there was some problems too. So if you have some time, I have a lot of ideas :)

njvack’s picture

Quicksketch, what does this feature do?

quicksketch’s picture

Commenting out this line (and another one on line 814) effectively removes the ability to theme individual components or the form itself. You could potentially theme the form to make individual collapsable fieldsets with certain form components inside of each one for instance. The full details are included in the webform module folder in a file named THEMING.txt. Until I can figure out why this feature suddenly broke, this won't be possible.

silurius’s picture

So is there no workaround at this time? Sorry if this is a dense question. If there is, would you mind laying it out in layperson terms?

pfaocle’s picture

See quicksketch's comment #11 - the change has been committed to HEAD and 4.7 branch. If you are using the 4.7 version, try re-downloading it and overwriting your copy of webform.module

pwolanin’s picture

Note, in the 4.7 Branch of Drupal, the patch to form.inc that may have casued the problem was reverted:

http://cvs.drupal.org/viewcvs/drupal/drupal/includes/form.inc?rev=1.112....

quicksketch’s picture

Status: Active » Closed (fixed)

Well, now that 4.7(.1) has been released, it seems that the behavior of the ['#theme'] parameter is probably solidified. The omitted line prevents the theming of individual components within webforms, but this may still be accomplished by theming the entire webform and only changing the desired fields.

In 4.7, the ['#theme'] parameter may be applied only once to a parent form item, and not to any of the parent item's children. As is, it looks like the removed line will stay that way.