Closed adrienshen closed 5 years ago
If you're using Form
, the form state is in your redux store so you can just bind to the value of the field. If you're using LocalForm
, you'll need to use the onChange
handler to store the form data in a local component where you can access it. It's not clear from your example code which you're using so it's difficult to help more.
Oh, I am use Form
, however I resolve this already. Thanks closing now.
The Problem
I would like to render or not render certain parts of the form based on early parts of the form. For example I have the fields: payment_type["cash", "insurance"] If insurance is selected, I would like to render certain insurance specific fields. And if cash is selected, I would like to render other fields. As it is, I see the the values are attached to the component and not easily accessibly at the parent level of redux forms. Is there currently a straight forward way I can accomplish this tasks?
Reproducible Code Example
(please fork from this CodePen template or this CodeSandbox template)