Changing theme

You can change the theme of an adaptive form to ensure that its appearance is consistent with the web pages where the adaptive form is embedded.

Changes in the overall appearance of the adaptive form using CSS properties are typically part of theme changes. Major changes to the lo ``ok and feel of the adaptive form, such as changes in the layout and placement of components are not considered theme changes.

Based on the bootstrap, the following set of CSS properties define the theme of a web page:

  • Background color
  • Border (type, color, thickness)
  • Font Color
  • Padding
  • Margin
  • Font Size
  • LineHeight

Currently, LESS variables are defined only for these properties of the various elements in an adaptive form.

Changing component style

You can change the appearance, layout, positioning, and visibility of elements. To achieve this task, create or update your custom .css files to include the styling constructs listed in this article.

To apply a style to an adaptive form, open the adaptive form in for editing, open properties of adaptive form conatiner, specify the path of custom CSS File in the basic tab. Defaut styling constructs of the adaptive form and overridden with the constructs listed in the custom .css file.

Components

The components discussed in this article have their predefined CSS classes. You can edit the variables to modify the styles in the CSS classes. Alternatively, you can rewrite the entire class. This section describes the classes within components and styles that you can modify using variables.

Container styling

A container is the top-level component. Other panels and fields lie under the container component.

CSS classguideContainerNode
Variables DescriptionVariables Description
container-bgColorBackground color of the container
container-paddingPadding for the container
container-marginMargin for the container
container-fontColorFont color for the container

Field styling

Adaptive forms include various types of fields. Each field has a unique class name, which is the name of the field. The field also has a common class name guideFieldNode.

Fields include labels, widgets, Help description (both Long and Short description), and Field Help icons (question mark).

CSS classguideFieldNode
VariablesDescription
field-paddingPadding for the field
field-error-font-colorFont color of the error message of field
field-error-font-sizeFont size of the error message of field

Label styling

The HTML element label used for the field includes the classes left or top depending on whether the label is at the top or left.

CSS classguideFieldLabel
VariablesDescription
label-font-colorFont color for the field label
label-font-sizeFont size for the field label
label-line-heightCSS line height property for the field label
label-font-weightCSS font weight property for the field label
label-marginMargin for the field label

The CSS rules for the label are applied using the guideFieldLabel label. If you are an author, override this rule to make your custom changes visible.

Widgets styling

Depending on their type, widgets also include classes. Commonly, widgets include the guideFieldWidget class. The widgets that ship with HTML normally use the standard HTML element input and select. The styling is done accordingly. You cannot style a custom widget by changing the variables.

CSS classguideFieldWidget
Variables``Description
widgets-bg-colorBackground color for the widgets (Does not work for check box and radio button)
widgets-border-colorBorder color for the widgets
widgets-border-thicknessBorder size for the widgets
widgets-border-radiusBorder radius for the widgets
widgets-border-typeBorder type for the widgets
widget-border-focus-typeFocus type for widget borders
widgets-borderConsolidated border style of widgets
widgets-font-colorColor of the text inside the widget
widgets-font-sizeSize of the text inside the widget
widgets-line-heightCSS lineheight property for the widget
widgets-paddingCSS padding property for the widget
widgets-focus-border-colorBorder color when the widget is in focus
widgets-mandatory-border-colorBorder color of the widget for the mandatory fields
widgets-mandatory-bg-colorBackground color of the widget for the mandatory fields
widgets-disabled-bg-colorBackground color for the widget when the field is disabled
widgets-disabled-font-colorFont color for the widget when the field is disabled
widgets-disabled-border-colorBorder Color for the widget when the field is disabled
widget-heightHeight of the widget (Does not work for checkbox and radio button)
checkbutton-heightHeight for check box and radio button.
listboxwidget-heightMaximum height for a multi-select dropdown

Limitations in widget styling

The styling for focused, mandatory, and disabled fields is restricted using variables. However, you can change it by overriding the styles. Restriction using variables is provided mainly to keep the number of variables in check. The restriction can be relaxed if the appearance of a field drastically changes because it is in any of the states discussed earlier.

Help description

An author can specify the Help content in the fields using Short and Long description components. Both components have a common class .guideHelpDescription and another class .long/ .short, depending on the type of description. The Help content is enclosed in a paragraph element to override the styling of the description. The Help description (both long and short) is modified using variables starting with widgetshelp, as mentioned in following table:

VariablesDescription
widgets-help-long-bg-colorBackground color of the widgets' long Help
widgets-help-long-border-colorBorder color of the widgets' long Help
widgets-help-long-border-indicator-colorLeft indicator border color of the widgets' long Help
widgets-help-short-bg-colorBackground color of the widgets' short Help
widgets-help-short-colorFont color of the widgets' short Help
widgets-help-short-tooltip-bg-colorBackground color of the widgets' short tool tip Help
widgets-help-short-tooltip-colorFont color of the widgets' short tool tip Help

Terms and Conditions

The Terms and Conditions (TnC ``) widget lets you specify terms and conditions. You can customize the widget using the variables described in the following table.

VariablesDescription
tnc-unvisitedFont color of unvisited tnc link.
tnc-visitedFont color of visited tnc link.

Button

Buttons are also widgets. However, their styling is slightly different from the widgets. In adaptive forms, any of the following constitutes a button:

  • input[type = text]
  • button
  • element with class .button

HTML code for button:

<button type="button" >

<span class="iconButtonicon"></

span>

<span class="iconButtonlabel"></

span>

</button>

CSS ClassDescription
iconButton-iconProvides icons for button
iconButton-labelStyles button label/caption
Variables``Description
button-border-sizeBorder size for the buttons
button-border-typeBorder type
button-paddingCSS padding property for the button
button-font-sizeFont size for the button
button-background-colorBackground color for the button
button-font-colorFont color of the button
button-border-colorBorder color of the button
button-large-paddingPadding for the large buttons (buttons with class .buttonlarge)
button-large-font-sizeFont size for large buttons
button-small-paddingPadding for the small buttons (buttons with class .buttonsmall)
button-small-font-sizeFont size for small buttons
button-info-background-colorBackground color for informative buttons (buttons with class .buttoninformative)
button-info-font-colorFont color for informative buttons
button-info-border-colorBorder color for informative buttons
button-warning-background-colorBackground color for warning styled buttons (buttons with class .buttonwarning)
button-warning-font-colorFont color for warning styled buttons
button-warning-border-colorBorder color for warning styled buttons
button-alert-background-colorBackground color for alert buttons (buttons with class .buttonalert)
button-alert-font-colorFont color for alert buttons
button-alert-border-colorBorder color for alert buttons

Question mark

For the widgets, a questionMark is displayed when an author adds a long description in the Help content. The default icon provided in bootstrap is used. To use a custom icon, you can customize the bootstrap icons.

CSS classguideHelpQuestionMark
VariablesDescription
questionmark-font-colorColor of the icon
questionmark-hover-font-colorColor of the icon when mouse is hovered over it

Table

You can change the color theme for header and body rows in a table by using the following variables.

VariablesDescription
table-header-bg-colorBackground color for the header row. The default value is #333.
table-odd-row-bg-colorBackground color for the odd body row. The default value is rgb(255, 255, 255).
table-even-row-bg-colorBackground color for the even body row. The default value is #eee.

File Attachment

The File Attachment widget of adaptive forms lets you upload files. You can also customize the widget using the variables.

VariablesDescription
fileItemPaddingPadding for the files displayed in the widget
fileItemBackgroundBackground color for the file item
fileItemBorderColorBorder color for the top border
fileItemColorFont color for the file item
filePreviewIconColorColor for the Preview icon (Bootstrap icon) in the widget
fileItemCommentHeightHeight of comment for the file item

There are four types of navigator tabs. These include tabs on the left, top, in the wizard and accordion. Each navigator has a different class.

NaviagatorCSS class
Accordion.accordion-navigators
tabs on the left.tab-navigators-vertical
tabs on the top.tab-navigators
Wizard.wizard-navigators

The following is the HTML code for the tab navigator element is (similar to the bootstrap tabs):

<li>

<a>tab title</a>

</li>

Accordion navigator is an exception, it has following barebone

structure:

<div class="accordion.navigators">

<div>

<div class = "guideHeader">

<a>

<span class = "guideSummary" ></code>

........................... repeatable buttons, if the repeatable configuration is set ................................

<div class = "repeatableButtons">

<button name="Add" class="Add"/>

<button name="Remove" class="Remove"/>

</div>

</a>

</div>

................................ panel content ..................................

</div>

</div>

You can change the styling of the navigator using CSS rules that select the elements using descendant selectors. For example, to add a text decoration style to the anchor tag:

Tab navigator on top:

.tab-navigators

li a {

text-decoration:

underline;

}

Tab navigator on left:

.tab-navigators-vertical

li a {

text-decoration:

underline;

}

Accordion navigator:

.accordion-navigators .guideHeader a .guideSummary {

text-decoration:

underline;

}

Wizard navigator:

.wizard-navigators

li a {

text-decoration:

underline;

}

Additionally, there are classes to style tab navigators (both left and top) based on whether they have nested/child/sub navigators.

CSS ClassDescription
nested_trueTab navigators (left and top) that have nested/child/sub navigators
nested_falseTab navigators (left and top) that do not have nested/child/sub navigators

The guideNavIcon class provides a default icon to tab navigators (both left and top) and wizard navigators.

CSS classguideNavIcon
NOTE
You can change the icon for a particular navigator by providing a CSS class on the panel in authoring, form example <CLASS_NAME>. You add a <CLASS_NAME>_nav for the icon of the navigator.
VariablesDescription
Tab Navigators
navigator-bg-colorBackground color for the entire tab navigator
tabs-bg-colorBackground color for the tab
tabs-font-colorFont color for the tab
tabs-hover-bg-colorBackground color for the tab on hover
tabs-hover-font-colorFont color for the tab on hover
tabs-active-bg-colorBackground color when the panel is in focus (active)
tabs-active-font-colorFont color when the panel is in focus
tabs-completed-bg-colorBackground color when the completion expression of the panel returns true
tabs-completed-font-colorFont color when the completion expression of the panel returns true
tabs-stepped-bg-colorBackground color when the panel has been in focus once but the completion expression returns false
tabs-stepped-font-colorFont color when the panel has been in focus once but the completion expression returns false
tabs-border-colorBorder color for the tab
tabs-font-sizeFont size for the tab
tabs-paddingPadding for the tab
tabs-marginMargin for the tab
tabs-vertical-marginMargin for the vertical tabs
tabs-border-thicknessBorder size for the tabs
tabs-min-heightMinimum height of the tabs
heirarichal-indentIndentation for the nested tabs
Wizard Navigators
wizard-navigator-bg-colorBackground color for entire wizard navigator
wizard-tabs-bg-colorBackground Color for the wizard
wizard-tabs-font-colorFont color for the wizard
wizard-tabs-active-bg-colorBackground color when the panel is in focus (active)
wizard-tabs-active-font-colorFont color when the panel is in focus (focused)
wizard-tabs-completed-bg-colorBackground color when the completion expression of the panel returns true
wizard-tabs-completed-font-colorFont color when the completion expression of the panel returns true
wizard-tabs-stepped-bg-colorBackground color when the panel has been in focus once but completion expression returns false
wizard-tabs-stepped-font-colorFont color when the panel has been focused once but completion expression returns false
wizard-tabs-border-colorColor for the wizard
wizard-tabs-font-sizeFont size for the wizard
wizard-tabs-paddingPadding for the wizard
wizard-tabs-border-thicknessBorder size for the wizard
wizard-nav-bullet-borderBorder color of the wizard navigator bullet (prefixing the caption/label)
wizard-progress-bg-colorBackground color of the wizard navigator progress bar
wizard-progress-colorFill color for the progress bar
Accordion Navigators
accordion-tabs-paddingPadding for accordion

Panel styling

A Panel includes an optional toolbar and its content.

CSS classguidePanelNode
VariablesDescription
panel-background-colorBackground color for the panel
panel-font-sizeFont size for the panel text
panel-font-colorFont color for the panel text
panel-paddingPadding inside the panel
panel-description-font-sizeFont size of panel's description
panel-description-paddingPadding of panel's description
panel-help-bg-colorBackground color for the panel's help
panel-help-border-indicator-colorIndicator border color for the panel's help

The panel node is divided into navigators and content. There ``is no separate styling component for the content. The variables described are applied on navigator and content.

The topmost panel (RootPanel) does not have this class.

Mobile styling

Header bar

These variables influence the header bar that is visible on a mobile device or small screen devices that contain panel title and next and back navigators.

CSS classguide-header-bar
VariablesDescription
headerbar-background-colorBackground color for the header bar
headerbar-font-colorFont color for the text inside header bar
headerbar-paddingPadding for header bar

Scroll indicator

These variables influence the Scroll indicator, which is an orange arrow that appears on a mobile device or small screen devices. A Scroll indicator indicates that there is content beyond the visible part of the screen. You can scroll down to see it. When you hit the end of content, the arrow disappears.

CSS classmobileScrollIndicator
VariablesDescription
scrollIndicatorBottomFixed position of scrollindicator from bottom
scrollIndicatorRightFixed position of scrollindicator from right
scrollIndicatorWidthWidth of scrollindicator
scrollIndicatorHeightHeight of scrollindicator

Mobile fixed toolbar layout-specific variables

These variables in the following table influence the mobile fixed toolbar layout.

CSS classmobileToolbar
VariablesDescription
mobileToolbarBottomFixed position of toolbar, on mobile device, from bottom
mobileToolbarTopFixed position of toolbar, on mobile device, from top
mobileToolbarLeftFixed position of toolbar, on mobile device, from left
mobileToolbarRightFixed position of toolbar, on mobile device, from right
mobileButtonIconTopMarginFixed position of toolbar's buttons' icon, from top
mobileButtonIconWidthWidth of toolbar's buttons' icon on mobile device
mobileButtonIconHeightHeight of toolbar's buttons' icon on mobile device
mobilefixedtoolbarbgcolorBackground color of toolbar on mobile device

Theme-specific variable

The Simple enrollment theme at /etc/clientlibs/fd/af/guidetheme/simpleEnrollment and the category guide.theme.simpleEnrollment also introduce a few variables. If you want to create a theme enhancing simple enrollment, you can use the following ``extra variables:

VariablesDescription
button-focus-bg-colorBackground color for button on focus
button-hover-bg-colorBackground color for button on hover
button-radiusRadius of button
navigation-button-bg-colorBackground color for navigation buttons (back/next)
navigation-button-bg-hover-colorBackground color for navigation buttons (back/next) on hover
initial-nav-colorBackground color for wizard navigators and corresponding progress bar, when first rendered.
active-nav-colorBackground color for current / active wizard navigator and corresponding progress bar
visited-nav-colorBackground color for wizard navigators and corresponding progress bar, which have been visited.
tabs-bifercating-border-colorBorder color bifurcating container into navigators and panel
tabs-navigator-separator-colorBottom border color separating tabs for tabs on left (tab navigators).
tabs-child-nav-bg-colorBackground color for navigator' nested/child/sub navigators

Experience Manager


Espressos & Experience Manager: AEM Forms

Espressos & Experience Manager

Thursday, Mar 6, 7:00 PM UTC

Join Adobe's AEM product team as they highlight AEM Forms' latest innovations, including: the new Gen AI Assistant, Unified Composition with AEM Sites, and new ways to deploy forms through conversations.

Register

Driving Marketing Agility and Scale: Transforming your Content Supply Chain with AI

Online | Strategy Keynote | General Audience

Marketers everywhere are feeling the pressure to deliver impactful campaigns faster and at greater scale. This Strategy Keynote explores...

Tue, Mar 18, 2:30 PM PDT (9:30 PM UTC)

Register

Rapid Feature Releases with AEM Cloud: Telegraph Media Group’s RDE Strategy

Online | Session | Intermediate

Hear how Telegraph Media Group, the award-winning publisher of The Daily Telegraph, The Sunday Telegraph, The Telegraph Magazine,...

Wed, Mar 19, 3:30 PM PDT (10:30 PM UTC)

Register

Connect with Experience League at Summit!

Get front-row access to top sessions, hands-on activities, and networking—wherever you are!

Learn more