@shailesh87/form-builder
v0.0.4
Published
MyGovernance form builder
Downloads
1
Maintainers
Readme
Usage Npm Package
Install package
sudo npm i custom-form-builder
Import Module
import { FormBuilderModule } from "@shailesh87/form-builder";
HTML usage
<custom-form-builder
[formData]="form"
(formTempChange)="onChange($event)">
</custom-form-builder>
Compoment Input Options
form: object = {
components: [
{
type: "textfield",
label: "FirstName",
key: "firstName",
input: true
},
{
type: "textfield",
label: "LastName",
key: "lastName",
input: true
},
{
type: "email",
label: "Email",
key: "email",
input: true
},
{
type: "button",
action: "Submit",
label: "Submit",
theme: "primary"
}
]
};
Add css reference in angular.ts usnder style
"node_modules/bootstrap/dist/css/bootstrap.css",
"node_modules/font-awesome/css/font-awesome.css",