2.0.7 • Published 6 years ago

@appstractdk/as-ajax-umbraco-form v2.0.7

Weekly downloads
13
License
ISC
Repository
-
Last release
6 years ago

as-ajax-umbraco-form

This is a JS component that hooks to all the Umbraco Forms you have on the page and submits them with ajax. Returns and displays errors if any received form the server.

Setup:

Import the script in your Script.js

import AjaxUmbracoForm from '@appstractdk/as-ajax-umbraco-form';

The Umbraco Form container div should have a class of ".ajax-umbraco-form".

If we want for it to automatically mount we need to add the class ".automount".

Example:

<div class="form-with-sidebar-page-form-wrapper ajax-umbraco-form automount">
	@umbraco.RenderMacro("renderUmbracoForm", new { FormGuid = Model.Form, mode = "script" })
</div>

If no auto-mount is desired, we can make a new instance by using the following:

new AjaxUmbracoForm(el, successTemplate)

Options

AjaxUmbracoForm(node, successTemplate)

node - a html node successTemplate - a html string template

2.0.7

6 years ago

2.0.5

6 years ago

2.0.4

6 years ago

2.0.3

6 years ago

2.0.2

6 years ago

2.0.1

6 years ago