Form (<b:form />) since 1.0 and FormGroup since 1.1.0

The <b:form> tag is an enhanced version of <h:form>.

Basic usage

The <b:form> tag inherits all the <h:form> attributes and behavior plus some Bootstrap specific attributes.

With Bootstrap you can have three kind of layouts for your forms:

<b:formGroup />

If you want to put muliple JSF elements into the same line of a horizontal form, you need to add a <b:formGroup />. Otherwise, BootsFaces generates a form-group div for each component, thus ruining the layout.

Attribute Default value Description
accept (none) List of content types that a server processing this form will handle correctly
acceptcharset (none) List of character encodings for input data that are accepted by the server processing this form.
binding (none) The ValueExpression linking this component to a property in a backing bean
dir (none) Direction indication for text that does not inherit directionality. Legal values: ltr (Default. Left-to-right text direction), rtl (Right-to-left text direction) and auto (let the browser figure out the direction of your alphabet, based on the page content).
enctype (none) Content type used to submit the form to the server. If not specified, the default value is 'application/x-www-form-urlencoded'.
horizontal false Use this flag to create a horizontal form (labels are on the same line as their input fields)
id (none) Unique identifier of the component in a namingContainer.
inline false Use this flag to create a inline form (labels are on the same line as their input fields)
lang (none) Code describing the language used in the generated markup for this component.
onclick (none) The onclick attribute.
ondblclick (none) Client side callback to execute when input element is double clicked.
onkeydown (none) Client side callback to execute when a key is pressed down over input element.
onkeypress (none) Client side callback to execute when a key is pressed and released over input element.
onkeyup (none) Client side callback to execute when a key is released over input element.
onmousedown (none) Client side callback to execute when a pointer input element is pressed down over input element.
onmousemove (none) Client side callback to execute when a pointer input element is moved within input element.
onmouseout (none) Client side callback to execute when a pointer input element is moved away from input element.
onmouseover (none) Client side callback to execute when a pointer input element is moved onto input element.
onmouseup (none) Client side callback to execute when a pointer input element is released over input element.
onreset (none) Javascript code executed when this form is reset.
onsubmit (none) Javascript code executed when this form is submitted.
prependId false Flag indicating whether or not this form should prepend its id to its descendent's id during the clientId generation process. If this flag is not set, the default value is true.
rendered false Boolean value to specify the rendering of the component, when set to false the component will not be rendered.
role (none) Role attribute used by screen readers.
style (none) Inline style of the input element.
style-class
styleClass (alternative writing)
(none) Style class of this element.
target (none) Name of a frame where the response retrieved after this form submit is to be displayed.
title (none) Advisory title information about markup elements generated for this component.
  • none.