The attached patch adds a module to the Form Builder project whose purpose is to augment the Webform module's UI with an interface that uses the form builder.

It is based (very very heavily) on the code that was removed from the Webform module itself in #738994: Remove Form Builder Integration.

If it doesn't make sense to have this be part of the Form Builder project, then of course I could create a separate drupal.org project for it, but I am starting by submitting it as a patch here.

There are a number of large bugs still remaining (and some webform functionality is not yet available, i.e. certain webform components cannot be added via this UI) but it's mostly working well enough to test in its current state, so I'm submitting it now as an interim patch.

This patch is actually written for Drupal 7 (and requires the patch at #404818: Port form_builder to Drupal 7 to be applied also), although the Drupal 6 version would probably not be that different from the code here.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

quicksketch’s picture

Thanks David. I'll be happy to put this directly into the Form Builder project. I agree it's better included with Form Builder than as a stand-alone project. However, we'll need a Drupal 6 port to be maintained at the same time. If you can provide a D6 port, I'll include both in the Form Builder project. Thanks!

David_Rothstein’s picture

Sounds good. Probably what we'll try to do is get the D7 version closer to being completed, and after that try to convert it back to D6.

So far, there isn't much difference. There are only a couple things I know of in the patch that won't work with D6: the use of filter_default_format(), the parameters of check_markup() have changed between D6 and D7, the menu callback form_builder_webform_components_page() returns an array in D7 (needs to be a string in D6), and maybe some of the webform-related function calls would change, e.g. due to passing $form as the first parameter in D7.

That's about it, though, and those aren't hard to fix.

effulgentsia’s picture

Subscribe.

illmatix’s picture

Subscribe.

EvanDonovan’s picture

Subscribe.

quicksketch’s picture

Hm, so I guess Drupal Gardens wins over community again here. http://www.drupalgardens.com/content/drupal-gardens-adds-custom-surveys-...

Is any Drupal 6 port likely here?

cbrookins’s picture

We are contributing *everything* did for D7 webforms and form builder back to the community so I am pretty sure everyone wins :) David is working on even going above and beyond our goals for Drupal Gardens and contributing back to D6 for the form builder work. We hope you and the everyone in the community all benefit from our contributions to your projects. We all want a strong webforms and form builder project because it helps any Drupal site that needs them, not just Drupal Gardens.

David_Rothstein’s picture

@quicksketch: As I said originally, our plan was to get the D7 version close to completion, and port it back to D6 after that. That is now done, so the patches are now attached... And all the code for our D7 work is already contributed back to the community, and we're in the process of posting it on drupal.org. (I would have preferred if it had been posted to drupal.org at the same time it was released in Drupal Gardens, but it is only a few days later so I don't think that is a problem, and it takes time to do it.)

Anyway, new patches for both D6 and D7 are attached. Additions since the latest patch include:

  • Support for the file component
  • Support for the pagebreak component
  • Complete text format support for the markup component
  • Support for #title_display
  • Lots of bugfixes

The Drupal 6 version basically has all the above working too, except for #title_display which is not complete yet (and may or may not be possible, since it's supported by Webform but not by D6 core).

The Drupal 7 patch obviously requires a number of other patches in order to work correctly (and I don't think all of them are posted on drupal.org yet), but the code should at least be reviewable.

The Drupal 6 patch should work fine as is, but requires #1009496: #input_format configuration form never uses the value stored with the element in order for input formats on the markup component to work correctly, and #1009508: Elements with the "multiple" but not "multiple_toggle" property (e.g. checkboxes) don't have their default values saved (to the Options Element module) for checkboxes to work correctly.

Thanks!

David_Rothstein’s picture

By the way, I forgot to mention that the additions to the latest patch contain work by some people other than myself. Mostly James Elliott, but a small amount by others also.

quicksketch’s picture

Status: Needs review » Fixed

Thanks guys. I've committed these initial patches immediately (having something is certainly better than the complete absence of Webform support currently). I very much appreciate the excellent work. My general animosity is certainly not towards your excellent work but the continuing movement of Acquia into every possible crevice and market, making a less friendly environment for everyone else.

David is working on even going above and beyond our goals for Drupal Gardens and contributing back to D6 for the form builder work.

Very much appreciated David. :)

David_Rothstein’s picture

Issue tags: +Form Builder D7

Great, thank you! Thanks for the quick commit.

We should have some more patches for the rest of Form Builder coming up too. It looks (based on this commit) like you are now using HEAD for the Drupal 7 version. Since there is no branch for that yet, I am adding a tag that we can use to keep track of issues that are relevant for Drupal 7 also.

David_Rothstein’s picture

Issue tags: -Form Builder D7

Tag is no longer necessary, since there is now a branch. (And the current issue was committed to both branches already.)

BenK’s picture

Keeping track of this thread

Status: Fixed » Closed (fixed)

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