Forms Standards: Inline Layout Usage

Version 6.2 by Vincent Massol on 2017/09/01
Warning: For security reasons, the document is displayed in restricted mode as it is not the current version. There may be differences and errors due to this.

Failed to execute the [velocity] macro. Cause: [The execution of the [velocity] script macro is not allowed in [xwiki:Documentation.DevGuide.FrontendResources.InlineForms.WebHome]. Check the rights of its last author or the parameters if it's rendered from another script.]. Click on this message for details.

XWiki Forms (xform / xformInline) are general usage purpose CSS classes that need to be used in order to have a consistent view of forms across XWiki.

  • Forms Layout Type:
    • Vertical Layout (xform): uses a dl-dt-dd structure 
    • Inline Layout (xformInline)

This classes implementation has been voted at [Vote] [Standards] Forms: Usage + Documentation page to and implemented in XSCOLIBRI-266


The CSS classes have as parent the .xformInline class. This is supposed to be used on the form tag, but if the styling is done inside dynamically generated structures it can be used on other elements, like divs, as long as the element remains the parent for the other form components. 

 Tag Type   Size  Classes RequiredOptional      Container       Usage
form                 .xformInline.half, .third                Container for the form controls
label                                                                      Descriptive label for the control
input text   size=30                                                      
input passwordsize=30                                                      
select        size=1                                                       
input submit        .button     .secondary  span.buttonwrapperButton controls
input button        .button     .secondary  span.buttonwrapperButton controls
a                    .button     .secondary  span.buttonwrapperButton controls






<form action="." class="xformInline" method="post" name="form_name1">
    <label for="input_id1">Label</label>
    <input id="input_id1" name="input_name1" type="text" value="" size="30"/>
    <span class="buttonwrapper">
      <input class="button" type="submit" value="Button"/>



.xformInline label {
 color: $theme.textColor;
 font-size: .85em;
 font-weight: 700;
 margin-bottom: .3em;
 text-transform: uppercase;

Get Connected