SunbirdEd Forms
Contains Form component powered by angular. This component expects a configuration and renders form according to the view.
Criteria | Info |
---|---|
Current Release Branch | release-4.4.0 |
NPM Published version (Latest) | 0.0.14 |
NPM Package Name | @project-sunbird/form-service |
NPM Link | |
Works | In Angular Projects Only |
Getting Started
Step 1: Install the package
Step 2: Include the library selector in view( Eg .HTML file)
<sb-form [config]='config'>
step3: Form component emits values on every input , To get value include event callbacks
Steps to Integrate the form
Please refer following link for sample config
The Form Can render following elements:
Text Box
Text Area
Drop Down (Single)
Multi Select Drop Down
Drop Down Data Sources: Drop Down can be provided with multiple types of Data Sources:
Static List
Closure which is called as MARKER in above config (A function which returns Promise of FieldConfig)
API Source - Currently Not Developed (Open For Contribution)
Example of Closure Implementation
The Logic Inside can be customised to own needs of project.
Function Signature should be as follows:
Last updated