Skip to content

Commit

Permalink
add htmlFor attribute in label tag
Browse files Browse the repository at this point in the history
  • Loading branch information
bipinstha7 committed Feb 24, 2019
1 parent 5456bc6 commit a5aa856
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions client/src/Components/surveys/SurveyField.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import React from 'react'
export default ({ input, label, meta: { error, touched } }) => {
return (
<div>
<label>{label}</label>
<input {...input} style={{ marginButtom: '5px' }} />
<label htmlFor={label}>{label}</label>
<input {...input} style={{ marginButtom: '5px' }} id={label} />
<div className="red-text" style={{ marginButtom: '20px' }}>
{touched && error}
</div>
Expand Down

0 comments on commit a5aa856

Please sign in to comment.