#Modularforms splittzed into multiple components

8 messages · Page 1 of 1 (latest)

elder grove
#

Hi everyone, is it possible to split the modularforms into multiple component (we can pass the field as props), if yes can is there's any example about this

bleak ember
elder grove
#

thanks @bleak ember for the reply, actully I m looking for a group of inputs in one single components

snow thicket
#

I don't understand the question. Could you give an example?

elder grove
#

Thanks @snow thicket for the reply what I m talking about is for example I have a multi-step form (using a steper for example) I would like to create one single form but every step is in a separate component

snow thicket
#

Ah ok. I'm going to defer to @cold schooner for that. You could make multiple forms or indeed a single form where you hide inputs and verify based on the step.
Not sure what is best.

elder grove
#

Thanks @snow thicket

cold schooner
#

Modular Forms is built in such a way that it prefers that you use both useForm and its components Form and Field in the same component. This is usually the route component. You then connect your individual components to it by passing data and functions through props.