Answers.Body: <p>By default it doesn't add them. You can get that added automatically by adding <code>useRequiredAttribute: true</code> to your form embed tag: <a href="https://docs.solspace.com/craft/freeform/v3/template-objects/field.html#properties" rel="nofollow noreferrer">https://docs.solspace.com/craft/freeform/v3/template-objects/field.html#properties</a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-08-14T14:23:36.900Z
Answers.Text: Thanks, exactly what I was looking for.
Answers.UserDisplayName: TC0072
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-08-14T06:35:37.870Z
Answers.LastActivityDate: 2020-08-14T06:35:37.870Z
Answers.UserDisplayName: darylknight
Body: <p>I've just started using FreeForm and so far it's fantastic after moving away from another solution.</p>
  <p>One thing I'm struggling with is how the &quot;required&quot; option works for fields. I would have expected it to add a required attribute to the input field, but all it does is add a required class to the label of that input.</p>
  <p>I know I can add the required attribute myself and that's what I'm doing now but wanted to check I'm not doing something wrong? The formatting template I'm using is Bootstrap 4 and I can see it only uses required in relation to labels.</p>
  
Tags: <plugin-freeform><solspace>
Title: Default Formatting Templates don't add "required" to input tag
ThreadText: # Default Formatting Templates don't add "required" to input tag
  
  (Asked by: username_0 on 2020-08-13)
  
  I've just started using FreeForm and so far it's fantastic after moving away from another solution.
  
  One thing I'm struggling with is how the "required" option works for fields. I would have expected it to add a required attribute to the input field, but all it does is add a required class to the label of that input.
  
  I know I can add the required attribute myself and that's what I'm doing now but wanted to check I'm not doing something wrong? The formatting template I'm using is Bootstrap 4 and I can see it only uses required in relation to labels.
  
  **Tags:** plugin-freeform, solspace
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2020-08-14. Score: 1 | Accepted answer
  
  By default it doesn't add them. You can get that added automatically by adding `useRequiredAttribute: true` to your form embed tag: <https://docs.solspace.com/craft/freeform/v3/template-objects/field.html#properties>
  
  > **Comments:**
  > **username_0**: Thanks, exactly what I was looking for.  
  
  ---
  
  