I've downloaded version 3.0.0 via nuget and I'm hoping to get some help rendering the form.
The instructions from your site http://www.formulate.rocks/render-form no longer seem valid. Namely, 'Rendering' is no longer present in the 'formulate.api' namespace. However, I was able to output the form content to the page like so:
@Html.Action("Render", "FormulateRendering", new { form = Model.Form })
However, the form does not render, presumably, because of some missing javascript dependecies. Can you please let me know what scripts I need to refence in my view to render a form in this new version?
I'm glad you were able to figure the hard part out (i.e., how to render the actual form data). This offers some guidance on the rest (i.e., displaying the form on the frontend): http://www.formulate.rocks/plain-javascript/render-form
This is the key bit:
@* The JavaScript file for Formulate's plain JavaScript template. *@
<script src="/App_Plugins/formulate/responsive.plain-javascript.min.js" async></script>
@* This is your JavaScript that handles events dispatched by Formulate. *@
<script src="/scripts/custom-formulate-script.js" async></script>
And this wrapper bit is somewhat important too (necessary in order for the custom-formulate-script.js to work):
@* Wrap the form with this element so the custom JavaScript can find it. *@
<div class="formulate-wrapper">
@* Render the form as you've already done. *@
</div>
But the main bit is the JavaScript.
Disclaimer: A colleague of mine has been leading the effort to support Umbraco 8 with Formulate 3, so there might be some nuances I'm not aware of. Give it a shot and let me know how it goes.
Form Rendering in 3+
Hi,
I've downloaded version 3.0.0 via nuget and I'm hoping to get some help rendering the form.
The instructions from your site http://www.formulate.rocks/render-form no longer seem valid. Namely, 'Rendering' is no longer present in the 'formulate.api' namespace. However, I was able to output the form content to the page like so:
@Html.Action("Render", "FormulateRendering", new { form = Model.Form })
However, the form does not render, presumably, because of some missing javascript dependecies. Can you please let me know what scripts I need to refence in my view to render a form in this new version?
n.b. I'm on Umbraco 8.1, .Net 4.7.2
Thanks in advance
Hi Daniel,
I'm glad you were able to figure the hard part out (i.e., how to render the actual form data). This offers some guidance on the rest (i.e., displaying the form on the frontend): http://www.formulate.rocks/plain-javascript/render-form
This is the key bit:
And this wrapper bit is somewhat important too (necessary in order for the custom-formulate-script.js to work):
But the main bit is the JavaScript.
Disclaimer: A colleague of mine has been leading the effort to support Umbraco 8 with Formulate 3, so there might be some nuances I'm not aware of. Give it a shot and let me know how it goes.
Ah, perfect! Yes, the form is rendering now. Thanks very much Nicholas!
is working on a reply...