This is related to #1444472: Webform doesn't create a node revision on save
It would be very useful to make webforms participate in basic drupal revisioning. Seems like it would probably not be that hard - perhaps just adding vid columns to the webform and webform_component tables? I can probably get some resources to work on this. Any interest in seeing this added to the module? Any caveats or gotchas you can think of?
Thanks

Comments

I'd be very excited for this as well. I was finally able to present webforms I built to the principals, and they did mention that a couple of their forms get used by clients over and over with just slight changes. Being able to pull up a previous submission, make a couple changes, then "Save As New" would be a huge boon. I don't think it wouldn't even require any changes to manage versions. Simply pre-filling the form with a previous SID's data would be a big help. Can a button be added on the "previous submissions" page to "view in form" and fill in the components according to that SID+CID?

Hi guys. @taquil, your request actually sounds different than the original poster's, since you're talking about revisioning *submissions*, and @wodenx is talking about revisioning the *webform node*.

Regarding the original request, I see no progress has been posted yet. Possibly because revisioning the webform nodes themselves is a significant challenge. What happens when you edit a form to remove options from a select list? What happens to the data that was previously set using the old options? The same problem is encountered when deleting entire fields. Normally Webform "cleans up" this data, but if you have the ability to revert to a previous revision, that data would have to stick around. Additionally, revisioning webforms could result in a massive increase in node revisions. Do you create a new revision after every component update? If you edit an existing component, does that create a new revision? Or would you add a "create new revision button" throughout the webform interface? Introducing revisions could end up putting a burden on the end-users.

All of the problems aside, I'm not opposed to revisioning Webforms. I just think that it's going to take a serious effort and a lot of UX thinking to make the functionality work.

Title:Make webforms revisionableMake webform nodes support revisions

Clarifying title so people know we're talking about revisioning nodes, not submissions here.

@quicksketch it does sound really complex, but I strongly agree that it's important functionality. I don't think it would be a burden on end-users, I think people who use Drupal revisioning want (or are prepared for) the huge pile of UX and additional data consequences? (And of course you don't have to enable revisions for an entire site or content type.) Additionally, Webform's lack of revisioning leads to problems when you have revisioning (and/or Workbench Moderation) enabled for Webform-enabled node types.

Anyway, I'm not really qualified to contribute real help with this problem, unfortunately, just wanted to add my two cents and give a general "+1" to this feature request. Thanks!

@quicksketch - when you say the data that was previously set - i assume you're talking about submissions? what issues do you foresee with regard to keeping submitted data for components which are deleted or modified? To me, it seems as though we might want to keep those data around anyway. Modifying a form doesn't necessarily mean you want to throw away all data collected via that form. Of course we'd have to think of a way of making those data accessible, and we'd have to make sure that cid's for particular components weren't reused.

I agree the UX issues are a bit complex. One solution might be to have changes to a webform always apply to the current revision of the node - so you'd create a new revision first (from the node edit form), and then modify the webform data for the new revision. However, my use case specifically involves creating *draft* revisions via workbench_moderation, and that would probably require a bit of extra work.

Working on this is still in our backlog -- we've just had a lot of other things prioritized.

One solution might be to have changes to a webform always apply to the current revision of the node - so you'd create a new revision first (from the node edit form), and then modify the webform data for the new revision. However, my use case specifically involves creating *draft* revisions via workbench_moderation, and that would probably require a bit of extra work.

This is what happens now, sort of -- including the workbench moderation-related side effects (at least on our site). [warning: approaching slight tangent...] What I mean is, every time you save changes to a Webform (the actual Webform), the current revision gets updated (no details of the Webform changes are part of the change history, it just adds on a node history record, sort of). We had the content type configured with default publishing status = draft, so this meant every time we saved changes to a Webform, the node would go into Draft state (as far as WB was concerned; as far as Drupal was concerned it was still "published"; the whole thing was very strange). BUT, we found this to be an issue with WB moderation, and the patch here has addressed the WB moderation-related issues with "using" the current revision.

@alisonjo2786 - can you link to the workbench patch you reference? Thanks.

It would be good to have the patch for WB. Or can it be found in the latest dev version?

@alisonjo

This is what happens now, sort of

Not exactly - the webform changes aren't associated with any specific revision -- they appear to affect the "current" revision, but if you were to revert to a previous revision, or make them to an unpublished revision, they would still apply.

Again - would be great to see the WB patch...

Issue summary:View changes

it would be great to have this possibility!