Is it possible for a Section to set a default css value (eg. form-group) and for every field (or specific ones) set "form-control" to be applied when its dropped on the form?

I know that as you add items onto the form you can define the css-class then. But if we're consistently using the same values to leverage bootstrap 4 form styling it would be really nice to have the class pre-populated.


1 Answer 1


You have 2 options:

  1. Overwrite the cshtml files used by Sitecore Forms. This gives you total freedom of the html that is returned by the forms. You can add div's, add classes, etc.. (You can find these files in Views/FormBuilder/FieldTemplates)

  2. Set styleclasses on the standardvalues. This way, the css classees will be prefilled in the editor. Content editors will however be able to change these styleclasses. The standard values can be found in "/sitecore/templates/System/Forms/Fields/***/__Standard Values"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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