Skip to content

Commit

Permalink
Add an example of no-value checkbox handling to the demo
Browse files Browse the repository at this point in the history
  • Loading branch information
insin committed May 16, 2020
1 parent b521bea commit 6fa4d22
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion demo/src/index.js
Expand Up @@ -103,8 +103,19 @@ class App extends React.Component {
</div>
<div className="form-field">
<label>
<input type="checkbox" name="tos" value="Y" defaultChecked/> I have read and agree to the <a href="#">Terms of Service</a>
<input type="checkbox" name="tos1" value="Y" defaultChecked/> I have read and agree to the <a href="#">Terms of Service</a>
</label>
<div>
(<code>value="Y"</code>)
</div>
</div>
<div className="form-field">
<label>
<input type="checkbox" name="tos2" defaultChecked/> I really, really agree to the <a href="#">Terms of Service</a>
</label>
<div>
(no <code>value</code>)
</div>
</div>
<button>Submit</button>
</AutoForm>
Expand Down

0 comments on commit 6fa4d22

Please sign in to comment.