ms.forms

This widget contains all the forms used on the page. It exposes the scope of the form.

By using this widget, we can simply create a form in ms.forms entity and use the form in the template by the same name we created the form in the entity.


Attributes

ms-success It is an attribute which is used to perform an action after the form like redirection on other page after form submission is submitted.
buttonname In this we have to give the button name e.g login, submit. If button name is not defined, then by default value of button is submit.
formname It contains the form name whch is to be used on the current and that form should be there in ms.forms entity.

Variables

fields It is an array which contains the fields of the form.
formData It is an object which contain the data of the form.
errors It contains the error for the corresponding field.

Methods

submit() This function is used to check the validity of the form. If errors, then form will not be submitted.