With input groups you can easily extend form controls by adding text, buttons, button groups on either side of textual inputs, custom selects, and custom file inputs. An InputGroupFormElement wraps a <div> tag with the class input-group around your control.

Element and builder

The InputGroupFormElement implementation has a corresponding InputGroupElementBuilder. An InputGroupFormElement can also be created via the factory method.

InputGroupFormElement attributes

A FormGroupElement can easily be customized through a variety of attributes.

Attribute Description


Specifies the layout of the form group. A layout can specify a grid, a type and whether labels should be rendered.


Defines whether the form group should be marked as required.


Whether the form group should look for field errors in the thymeleaf context.


Creating a InputGroupFormElement with a left addon

import static com.foreach.across.modules.bootstrapui.ui.factories.BootstrapViewElements.bootstrap;

            .placeholder( "Username" )
            .type( TextboxFormElement.Type.EMAIL )

            .label( "@" )