Form Generator
FormGenerator is used to automatically generate a form with correct groups, labels, and field types when supplied with a FormStructure model.
Demo
CLICK
Required Imports
import { FormGeneratorModule } from 'nextsapien-component-lib';
Properties

Type | Name | Description | Data type | Required | Default | Demo
--- | --- | --- | --- | --- | --- | ---
Input | formStructure | Structure to build the form from. | FormStructure | true | n/a | n/a
Input | fieldChange | Observable for FormFieldStructure that indicates when a fields config. For text and select value setting this is not needed but must be trigger to detect changes in select, multiselect, and typeahead configs in form structure. | Rxjs.Observable Of Object with groupName: string, structure: FormFieldStructure | false | n/a | n/a
Output | formGroupUpdate | FormGroup for the consumer to control and read the form. It will be structured with the subgroups provided with the fields inside those formgroups. | FormGroup | n/a | n/a | n/a
Output | formGroupExpanderChanged | If the form group has expansion panels, this event lets the consumer track the state of each panel. The FormGroupExpanderChange event contains the group name/title as well as a boolean indicating if the panel is opened. | FormGroupExpanderChange | n/a | n/a | n/a
Input | groupChanges | An observable that tracks changes in the form groups. | n/a | false | n/a
Input | formStyle | The style of the form, based on the `FormGenStyle` enum. | n/a | false | n/a
Input | dateFormat | The format for the date fields. | n/a | false | MM/DD/YYYY
Input | currencySymbol | The symbol used for currency fields. | n/a | false | $
Input | hideCents | Determines if cents should be hidden for currency fields. | n/a | false | false
Input | useTooltips | Specifies if tooltips should be used. | n/a | false | false