ng-mat-forms
  • Introduction
  • Installing
  • Getting Started
  • Attributes
    • Options
      • column
      • errorMsgOnSubmit
      • floatLabel
      • color
      • appearance
    • Fields
      • type
      • label
      • formControlName
      • directive
      • placeholder
      • regex
      • defaultValue
      • validators
      • list
      • disable
      • labelShow
      • minDate
      • maxDate
      • changeEvents
      • blurEvents
      • maxLength
      • minLength
      • getListFromApi
      • api
      • loadDepenentSelectOnChange
      • errorMessage
  • Callbacks
    • formFieldsChange
    • formChange
    • formSubmit
  • Apis
    • setControlValue
    • setFormValue
    • setControlDisable
    • setControlEnable
    • setValidator
    • removeValidator
Powered by GitBook
On this page

Was this helpful?

  1. Callbacks

formSubmit

Description

called when the form submits

  • event parameter:

    • event.formValue: value of the form

    • event.formStatus: status of the value

  • event parameter type is NgMatFormSubmitModal

Example:

onformSubmit(event: NgMatFormSubmitModal) {
  //Other operations here...
  console.log({formValue: event.formValue,
  formStatus: event.formStatus});
}
<ng-mat-forms [Fields]='ngMatFormFields' 
[options]='ngMatFormsOptions' 
(formSubmit)="onformSubmit($event)"></ng-mat-forms>
PreviousformChangeNextApis

Last updated 5 years ago

Was this helpful?