How can I get form json in FormBuilder.component.ts file
See original GitHub issueHi ! I am new to this dynamic form builder and i have checked in code so i noticed that on save button click there are we have json of complete form which is we drag and drop in screen . So now i added one button and in this button click i want that json data.
`export class FormBuilderComponent implements OnInit { data: any; public myService: any; constructor(private dataService: DataService) { }
formBuilder: any; formData: any; ngOnInit(): void { initJq(); var actionButtons = [ { id: “smile”, className: “btn btn-success”, label: “😁”, type: “button”, events: { click: () => { this.dataService.addFormTemplate(); } } } ]; this.formBuilder = (<any>jQuery(‘.build-wrap’)).formBuilder({ actionButtons: actionButtons }); console.log(this.formBuilder); } } ` I want pass json data in click event of button
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (2 by maintainers)

Top Related StackOverflow Question
this.formBuilderwill already be defined when the button is clicked so you can access the data using eitherthis.formBuilder.actions.getDataorthis.formBuilder.formDataAny update on this? Having the same problem. No other way to pass formBuilder data/options through custom actionButtons.