projects/components/widgets/data/form/src/form.component.doc.ts
The wmForm component defines a form in the layout.
Methods |
Inputs |
clearMessage |
clearMessage()
|
This method is used to clear the message in the form in case of inline message layout.
Returns :
void
|
highlightInvalidFields |
highlightInvalidFields()
|
This method loops through the form fields and highlights the invalid fields.
Returns :
void
|
onBeforesubmit | ||||||||||||||||
onBeforesubmit($event: MouseEvent, widget: any, $data: any)
|
||||||||||||||||
Callback is triggered on submit of form and before sending service call. This callback an be used to validate or modify data.
Parameters :
Returns :
void | boolean
if the callback returns false, form submit is stopped. Anything else, form submit continues with modified data. |
onError | ||||||||||||||||
onError($event: MouseEvent, widget: any, $data: any)
|
||||||||||||||||
This event handler is called whenever the form submit returns an error.
Parameters :
Returns :
void
|
onPinchin | ||||||||||||
onPinchin($event: TouchEvent, widget: any)
|
||||||||||||
Callback function which will be triggered when a pinchin event is triggered.
Parameters :
Returns :
void
|
onPinchout | ||||||||||||
onPinchout($event: TouchEvent, widget: any)
|
||||||||||||
Callback function which will be triggered when a pinchout event is triggered.
Parameters :
Returns :
void
|
onResult | ||||||||||||||||
onResult($event: MouseEvent, widget: any, $data: any)
|
||||||||||||||||
This event is called after service call returns response, whether or not the service call was successful.
Parameters :
Returns :
void
|
onSubmit | ||||||||||||||||
onSubmit($event: MouseEvent, widget: any, $formData: any)
|
||||||||||||||||
This event handler is called whenever a submit event is triggered.
Parameters :
Returns :
void
|
onSuccess | ||||||||||||||||
onSuccess($event: MouseEvent, widget: any, $data: any)
|
||||||||||||||||
This event handler is called whenever the form submit is success.
Parameters :
Returns :
void
|
onSwipedown | ||||||||||||
onSwipedown($event: TouchEvent, widget: any)
|
||||||||||||
Callback function which will be triggered when a swipedown event is triggered.
Parameters :
Returns :
void
|
onSwipeleft | ||||||||||||
onSwipeleft($event: TouchEvent, widget: any)
|
||||||||||||
Callback function which will be triggered when a swipeleft event is triggered.
Parameters :
Returns :
void
|
onSwiperight | ||||||||||||
onSwiperight($event: TouchEvent, widget: any)
|
||||||||||||
Callback function which will be triggered when a swiperight event is triggered.
Parameters :
Returns :
void
|
onSwipeup | ||||||||||||
onSwipeup($event: TouchEvent, widget: any)
|
||||||||||||
Callback function which will be triggered when a swipeup event is triggered.
Parameters :
Returns :
void
|
reset |
reset()
|
This method is used to reset the form.
Returns :
void
|
submit |
submit()
|
This method is used to submit the form.
Returns :
void
|
toggleMessage | ||||||||||||||||||||
toggleMessage(show: boolean, msg?: string, type?: string, header?: string)
|
||||||||||||||||||||
This method is used to show the message in the form.
Parameters :
Returns :
void
|
action |
Type : string
|
Defines the action to be performed on successful submission of the form. Bindable: |
autocomplete |
Type : boolean
|
Default value : false
|
Enabling this property turns on auto-completion in the editor. As the user types into the pull-down select editor, the choices change dynamically. |
captionalign |
Type : string
|
Default value : 'left'
|
Defines the alignment of the caption elements of widgets inside the form. Allowed Values:
|
captionposition |
Type : string
|
Default value : 'left'
|
Defines the position of the caption elements of widgets inside the form. Allowed Values:
|
captionwidth |
Type : string
|
Default value : 'xs-12 sm-3 md-3 lg-3'
|
Accepts integer(x) between 1-12 and adds class col-xs-(x) for mobile, col-sm-(x) for Tablet Potrait, col-md-(x) for Laptop Tablet Landscape , col-lg-(x) for Large screen to suit bootstrap fluid grid system. |
class |
Type : string
|
Class of the widget. |
collapsible |
Type : boolean
|
Default value : false
|
Enable control for collapsing and expanding the widget. |
dataset |
Type : any
|
This property specifies the datasource to which values of form are submitted. Bindable: |
enctype |
Type : string
|
The encoding type property specifies how the form-data should be encoded when submitting it to the server. Allowed Values:
|
errormessage |
Type : string
|
Default value : 'An error occured. Please try again!'
|
This message will be displayed, if there is an error during form submit. Bindable: |
expanded |
Type : boolean
|
Default value : false
|
Set the default state of the form whether it is expanded or collapsed. |
formdata |
Type : any
|
Default data to show in the form on load. Bindable: |
iconclass |
Type : string
|
CSS class of the icon showed in form header. Bindable: |
messagelayout |
Type : string
|
Default value : 'Inline'
|
This property decides the appearance of the success/error message after submit operation. Allowed Values:
|
method |
Type : string
|
Defines the method to be used for submission of the form to the server. Allowed Values:
|
name |
Type : string
|
Name of the form widget. |
postmessage |
Type : string
|
Default value : 'Data posted successfully'
|
This message will be displayed, when data is posted by form. Bindable: |
show |
Type : boolean
|
This property will be used to show/hide the form widget on the web page. Bindable: |
subheading |
Type : string
|
This property defines the sub heading or title for the widget. Bindable: |
tabindex |
Type : number
|
Default value : 0
|
This property specifies the tab order of the Form Widget. |
target |
Type : string
|
Defines the target for the form. Allowed Values:
|
title |
Type : string
|
Title of the form. Bindable: |
validationtype |
Type : string
|
Default value : 'default'
|
This property defines the type of validation applied on the form. Allowed Values:
|