I've set up some fairly complicated webforms and I'm wondering if there is an easy way to clone an existing web form?

This need resurfaces for me because I need to create a series of complex webforms with very small, but distinct, differences.

If this is not possible within the module, would something like the Node Clone module (http://drupal.org/project/node_clone) work for this purpose? I wasn't sure if there was some added complication because of how the Webform module implements "components."

Thanks,
Ben

P.S. What a terrific module. Great job, quicksketch!

Comments

ttaylor797’s picture

I had hacked a way into the webform 1.x that used a custom webform_clone function, a modified webform_insert(), and webform_menu functions. The process worked well and preserved all the components and settings from the original webform.

Unfortunately, I am new to contributing back to any Drupal projects, and I have recently upgraded to webform 2. Of course now have to re-hack the new module.

I would like to release the code, so that it can be included into a patch or the next version, but I am not 100% sure how to do that yet. Does anyone have any idea how I could do that?

I don't think the node_clone would work because the webforms are not nodes themselves.

quicksketch’s picture

Node clone works perfect with Webform and it's what I'd suggest you use for this purpose (we do the same thing within my company). Webforms are nodes (as the project page mentions), which is what differentiates it from CCK (which creates content-types).

BenK’s picture

I tried using the "Node Clone" module and it works great with Webforms. Thanks for the tip!

--Ben

quicksketch’s picture

Status: Active » Fixed
Anonymous’s picture

Status: Fixed » Closed (fixed)

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

vako’s picture

Node clone won't transfer the database or form submissions as well.
Is there a way to copy the whole webform, including the submissions?