2 votes

Contour Workflow - Save to Page Specified in Form Field

This is a simple Contour WorkFlowType, based on the save as page one that ships with Contour, but instead of saving to a predefined page that you define when you set up the form, you can specify one of the form fields as having the node id of the parent node to publish to.

I developed this for a site where a user can post questions to sections of a site that are also saved as content under the category that was selected from the form, for later publishing as popular questions. It makes the publish form as page a bit more flexible.

I've only tested this with having it map to a field that contains a list of umbraco pages, using the "Umbraco Documents" prevalue type, but as long as the control you use contains a valid node id, it should work for other/custom controls as well.

This is just a basic version at the moment, I may develop this further to add additional settings at some point in the future.

Installation:

Simply drop the DLL into your site bin folder, and the option "Save as umbraco document - parent page from form" should appear in the list of field types that are available in Contour when adding/editing forms.

Source Code:

I've included the .cs file so that you can modify this as you see fit. You should be able to either just drop this into your App_Code folder, or put it into a separate project and compile it into a DLL (if you do that, you'll need to add references to umbraco, cms, businesslogic, and umbraco.forms.core, otherwise it won't build).

No current release

Package owner

Tim

Tim

Tim has 2675 karma points

Package Compatibility

This package is compatible with the following versions as reported by community members who have downloaded this package:
Untested or doesn't work on Umbraco Cloud
Version 8.18.x (untested)

You must login before you can report on package compatibility.

Previously reported to work on versions:

Package Information

  • Package owner: Tim
  • Created: 13/04/2010
  • Current version 1.0
  • License MIT
  • Downloads on Our: 869