After upgrading Webform from version 7.x-4.0 to version 7.x-4.2, i could no longer add any of the options element (select list, checkbox, radio button) using drag and drop to my webform. The other fields were working just normal.
rolling back to version 7.x-4.0 solved the issue.
i don't know if this is a bug.
i would appreciate your support.

Comments

enhelmy’s picture

Project: Webform Alternate UI » Form Builder
Version: 7.x-1.0-alpha6 » 7.x-1.6
Component: User interface » Webform Itegration
nod_’s picture

nod_’s picture

StatusFileSize
new572 bytes

Dirty webform patch that essentially revert the webform commit. Now formbuilder works as expected.

markus_petrux’s picture

Work for me as well. But this is a patch for Webform, should it be fixed there? ...or maybe there is something that can be done from Form Builder? ..ie. why is FB adding an empty list when drag'n'drop is being used?

markus_petrux’s picture

Version: 7.x-1.6 » 7.x-1.x-dev
Status: Active » Needs review
StatusFileSize
new1.81 KB

Got a way to fix the issue within Form Builder itself.

markus_petrux’s picture

StatusFileSize
new1.81 KB

Fixed patch format.

genjohnson’s picture

markus_petrux, thanks for creating the patch.

I wasn't able to apply the patch in #6 - I got the error "form_builder/modules/webform/form_builder_webform.components.inc: No such file or directory". It looks like the patch in #6 was created from outside the form_builder directory.

I've re-rolled the patch from the form_builder directory, so the only difference is the path of the file to modify.

Cale Bierman’s picture

Status: Needs review » Reviewed & tested by the community

I've tested the above patch and it seems to be working as expected.

marco van bemmel’s picture

Patch #7 works like a charm :-)
Thank you all!

torotil’s picture

Status: Reviewed & tested by the community » Needs work

I think this patch is a workaround for a deeper lying problem: The defaults are rendered using webform and the resulting renderable arrays are messed with.

So I'd suggest to pass the additional items and default value as $merge_extras parameter _form_builder_webform() instead. Then the component's render function should give us some reasonable output.

This issue has another aspect though: We really should display some placeholder if the webform component doesn't yield any output.

mikran’s picture

Category: Support request » Bug report
Priority: Normal » Major

This looks major bug to me

cigotete’s picture

I agree with to change to Major the status (please note that the Form Builder 7.x-1.6 includes a security update).

thamas’s picture

Patch #7 fixes the UI so form builder is usable again. Cool, thanks!

However every new component you add makes a strict warning in Drupal log like this:

Strict warning: Only variables should be passed by reference in _form_builder_add_element() (line 121 of …/sites/all/modules/contrib/form_builder/includes/form_builder.admin.inc).

drupalninja99’s picture

Status: Needs work » Needs review
StatusFileSize
new2.74 KB

The strict error I think was just due to trying to call too many functions on one line. I assigned drupal_get_form to a $form variable on a separate line and that fixed the watchdog error for me.

torotil’s picture

So let's take this one step at a time. Here is a patch that transforms the default select-boxes to use the extra-array instead of messing with the renderables.

torotil’s picture

@drupalninja99 I've already commited the fix for the strict warning into 7.x-1.x.

  • torotil committed 092661c on 7.x-1.x
    Issue #2383285 by markus_petrux, torotil, nod_, genjohnson,...
torotil’s picture

Status: Needs review » Fixed
ucscholar’s picture

@torotil

Do I just need to apply the "form_builder-options_element_hidden-2383285-15" patch to fix the options element issue?

torotil’s picture

@ucscholar: just #15 should be fine.

Status: Fixed » Closed (fixed)

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