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.


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

  • Thanks, exactly what I was looking for.
    – TC0072
    Aug 14 '20 at 14:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.