Feature request - Quick preview of your form
Our editors would love to see a feature in Umbraco Forms where you could preview the form that you've built and submit the form. In that way you can test if the form, the validations and the workflow work correctly. A simple preview button on the top right, or in the bottom bar would be perfect.
The form itself could be on a white page with default styling (or that you have the option to include some styling in this previewpage).
The current situation for the editor is:
- Create a form
- Create a testpage
- Add the form to the testpage
- Check if it works
- Go back to 1 to update the form and repeat
- If everything works, delete the testpage and put the form on the correct page
The new situation would be:
- Create a form
- Test the form
- Add it to the correct page
This item has been added to our backlog AB#28078
On some of our projects we have multiple form themes so the editor has the option to give the form a different look and feel. A nice feature could be to include a form theme picker when previewing the form. It could for example be picked from a dropdown.
This should now be fairly easy to create as a Content App, which would even allow you to test it using the sites styling.
I've hacked something together that uses a SurfaceController to render the form with the default Bootstrap styling (extract this to your App_Plugins folder and ensure the *.cs files are compiled on build): UmbracoFormsPreview.zip.
Funny,, I was thinking of hacking on this too today @ronaldbarendse , but you've got much further than me! Nice work. Feel free to re-work into a PR if you think this is something worth shipping with.
I think to tighten it up would be good to also have:
- Secured for back-office authenticated users only.
- Make sure it supports multi-page forms.
- Content app shouldn't be visible unless the form has been saved.
- Provide options for customisation:
- Include the theme via a drop-down as per the suggestion above... if you think it's feasible?
- Flag for whether submit should actually save data - could be you'd want to do that, but also perhaps not if you just want to check the form submits OK.
- Flag for whether to process workflows.
We can schedule some time in for a future sprint so you have time for doing it "officially"!