tsedio/tsed-formio

[QUESTION] Access to the formController

jpstijn opened this issue · 2 comments

Hi,

I saw that there was a question asked here 4 days ago so thats why i thought maybe i could ask for help as well. I would like to fire validation on a form from an button outside the form itself. When looking at the formio documentation i thought i could use the formController to do this.

image

But i cant seem to find a way to retrieve the form controller when rendering my form in this way:
<form form={formContent} />

Hello @jpstijn

You can retrieve the formio instance by listening the onFormReady event:

import {Form as FormFormio} from "formiojs";
import {Form} from "@tsed/react-formio";

<Form onFormReady={(formio: FormFormio) => {   } />

See you :)

This PR improve the typings #50 for the onFormReady event :)