I'm providing a patch and a tar.gz file here. The tar is a separate module designed to work with the 2.x branch of webform to provide integration to form builder. It should work just fine with webform 2.6, it also provides some capabilities that webform doesn't have by default (fieldsets within fieldsets) and is generally very nice.

The second file is a patch against webform to integrate this directly however I'm having to upgrade that because I think it's against 2.4 or older... I'll try to have that up this evening. This system can manipulate existing webforms, however it has issues with creating its own... I don't know why, all the code is basically hacked apart version of the tar from above.

Let me know how I can help with this further!

Eclipse

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

quicksketch’s picture

Version: 6.x-2.x-dev »

Yay! Looks like the patch didn't make it though. :-(

I plan on integrating this into the 3.x version of Webform. Thanks!

EclipseGc’s picture

I'm holding the patch still as it's against what I THINK is 2.4... maybe older... anyway, I'm going to try to get that up tonight for you. Can't wait to play with webform 3, anything else I can do to help?

quicksketch’s picture

Status: Active » Needs review
FileSize
29.66 KB

Hurray, a working version of Webform + Form Builder together! Here's my initial patch based on EclipseGc's excellent starting code. It makes absolutely NO changes to the existing Webform workflow if Form Builder is not installed. If Form Builder is installed, it pulls in webform.form_builder.inc and changes the default interface to use it. You can still use the old interface also by using a set of links at the top of the components tab.

Right now this patch only supports select.inc (with radios, select, and checkboxes), textarea.inc, and textfield.inc. I have a mostly working version of file.inc and fieldset.inc, but they need some more extensive changes than these "basic" types. I'd like to clean up those components anyway as we do this conversion to keep the amount of duplicated code down.

Note I also released super-alpha versions of Form Builder (version 0.5 and higher) today to make it easier to test everything out together.

quicksketch’s picture

Oh, regarding API changes:

- I added a $filter variable to the main Webform form function and to components' rendering functions. This is because Form Builder needs "raw" properties to edit, such as a #description and #default_value that haven't been filtered. So when Form Builder loads the Webform form, it uses the unfiltered version for editing. The descriptions and default_values are then modified just before the form is rendered to the page.

- I removed the $preview property from the main Webform form function because now that we're D6 only, we can just check $node->build_mode == NODE_BUILD_PREVIEW.

quicksketch’s picture

FileSize
38.87 KB

Updating patch that adds support for Hidden, Markup, and e-mail components.

Now the only remaining components are date, file, grid, pagebreak and time. Considering all of these will take quite a bit more work, I think it'd be best to make them followup issues.

quicksketch’s picture

Status: Needs review » Fixed

Committed patch from #5. Yay! Please note for any testers, do not file bugs concerning the interface or functionality of Form Builder in the Webform issue queue. Instead file over in the Form Builder queue.

quicksketch’s picture

Here's a followup that makes a change to the node/x/webform/components page to make sure you always return back to the same mode after editing or adding a component. Also committed.

Status: Fixed » Closed (fixed)

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

SocialNicheGuru’s picture

Version: » 7.x-3.x-dev

is form_builder and webform 3.x or 4.x compatible?