DEV Community

Discussion on: How to create multi-step forms in React?

Collapse
 
mohsinalisoomro profile image
MOHSIN ALI SOOMRO

Very nice but is it working with checkbox and files?

Collapse
 
sametweb profile image
Samet Mutevelli

I just published an update. I missed the fact that checkboxes are a little different from regular text inputs/areas.

Now props.handleChange function can be passed to onChange event of a checkbox field. props.getState('checkbox_name') can be passed to checked property of the same field. About file inputs, I need to do more research. However, props.setState('key', 'value') method for updating state can be a workaround for now.

Collapse
 
jaishinawaraj profile image
Nawaraj Jaishi

@Samet Mutevelli please can you provide a example of using radio button or check button