One of the variables floating around right now is an array called attr.
And if it has a class key, that’ll be printed out by the widget_attributes
block. Let’s add our class to this variable. The code leverages the heck
out of Twig. I know it looks strange:
Let’s do one more thing! The labels also need a class: control-label.
This should be getting easy now. Find the form_label block in form_div_layout.html.twig
but don’t copy it. Instead, add a blank form_label block to our template: