Chrome Extension

Radio Button Input field in Redux Form

To add radio buttons input fields on your redux form you need to pass radio to type attribute of Field and provide the same value to name attribute.
<div>
    <label>Choose Color</label>
    <div>
        <label>
            <Field name="color_selection" component="input" type="radio" value="green" />
            <span>Green</span>
        </label>
        <label>
            <Field name="color_selection" component="input" type="radio" value="red" />
            <span>Red</span>
        </label>
        <label>
            <Field name="color_selection" component="input" type="radio" value="blue" />
            <span>blue</span>
        </label>
    </div>
</div>
Best JSON Validator, JSON Tree Viewer, JSON Beautifier at same place. Check how cool is the tool
Was this helpful?
0 Comments