I've created a multi-step form with Contour and I'd like to render a "progress bar" above the form, to show which of the steps the user is currently on.
Using the exported form, I can easily create the progressbar with XSLT - but the great thing about Contour is of course that the client can edit the forms, creating new steps or renaming the existing ones. Which leaves me with the problem of having to re-export the XML in order to keep the progressbar in sync...
None of the extensions in the "umbraco.contour" namespace seems to give me the form's XML (they only return "records"), so I was thinking it should be possible to write an extension to do it — does anyone (Tim?) know if the Export method is public in the source so it's possible to essentially create an App_Code extension that could return the XML?
Hey Chriztian, are you using the razor macro then it should be pretty simple to update the form markup with a progress bar... let me know if you are/aren't then I can give you the correct pointers!
So I need to know which step is the current (with XSLT I could grab that from the Request) and of course what the other steps are, and the order they're in.
Extension to export the form XML?
Hi guys,
I've created a multi-step form with Contour and I'd like to render a "progress bar" above the form, to show which of the steps the user is currently on.
Using the exported form, I can easily create the progressbar with XSLT - but the great thing about Contour is of course that the client can edit the forms, creating new steps or renaming the existing ones. Which leaves me with the problem of having to re-export the XML in order to keep the progressbar in sync...
None of the extensions in the "umbraco.contour" namespace seems to give me the form's XML (they only return "records"), so I was thinking it should be possible to write an extension to do it — does anyone (Tim?) know if the Export method is public in the source so it's possible to essentially create an App_Code extension that could return the XML?
Thanks in advance,
/Chriztian
Comment author was deleted
Hey Chriztian, are you using the razor macro then it should be pretty simple to update the form markup with a progress bar... let me know if you are/aren't then I can give you the correct pointers!
Hi Tim,
Thanks - Yes, I'm using the umbracoContour.RazorRenderForm macro for this.
I need to generate this very simple list of items - almost a standard navigation snippet:
So I need to know which step is the current (with XSLT I could grab that from the Request) and of course what the other steps are, and the order they're in.
/Chriztian
Comment author was deleted
Easiest is to do this in the razor file :)
http://our.umbraco.org/projects/umbraco-pro/contour/documentation/Developer/Custom-Markup/
Comment author was deleted
To check if it's current you can do page.Caption == Model.CurrentPage.Caption
Thanks Tim!
That does the job - I have a couple of follow-up questions, but I'll put them in a new thread...
/Chriztian
Comment author was deleted
Sweet :)
is working on a reply...