TransWikia.com

Default Formatting Templates don't add "required" to input tag

Craft CMS Asked on September 15, 2020

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.

One 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

Correct answer by darylknight on September 15, 2020

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP