Clay
Skip to ContentClayClay by Liferay
  • Get Started
    • Introduction
    • What is Clay
    • Importing the JS Component
    • Using JS Components with Metal.js
    • Web Components
  • Foundations
    • Grid
    • Typography
  • Lexicon Core Components
    • Alerts
    • Badges
    • Buttons
    • Cards
    • Charts
      • Advanced Examples
        • Axis Label
        • Axis Range
        • Data Color
        • Gridlines
        • Predictive forecasting
        • Regions
        • X Axis Tick Formatting
      • Basic Examples
        • Bar Chart
        • Bubble Chart
        • Combination Chart
        • Donut Chart
        • Gauge Chart
        • Geomap Chart
        • Line Chart
        • Pie Chart
        • Scatter Chart
        • Spline Chart
        • Step Chart
    • Dataset Display
    • Dropdown Menu
    • Forms
      • Checkbox, Radio, and Toggle
      • Forms
      • Forms Hierarchy
      • Forms Navigation
      • Multi Step Form
      • Multi Step Form Simplified
      • Selectors
      • Text Input
      • Text Input Group
      • Text Input Localizable
      • Text Input Variations
    • Icons
    • Labels
    • Link
    • List
    • Loading Indicator
    • Modals
    • Navigation
      • Breadcrumbs
      • Navigation Bar
      • Vertical Navigation
    • Pagination
    • Popovers and Tooltips
    • Progress Bars
    • Sidebar
      • Info Panel
    • Stickers
    • Table
      • Inline Edit Table
      • Table
    • Tabs
    • Toolbars
      • Management Toolbar
  • CSS Framework
    • SCSS
    • Class Helpers
    • Satellite Components
      • Alerts
      • Badges
      • Button Group
      • Cards
      • Dropdown Menu
      • Forms
        • Form Elements
        • Form Elements (Input Groups)
        • Form Elements (Validation)
      • Images (Aspect Ratios)
      • Images and Thumbnails
      • Labels
      • Links
      • List Groups
      • Modals
      • Nav
      • Navigation
        • Header
      • Paginations
      • Panels
      • Popovers and Tooltips
      • Progress Bars
      • Stickers
      • Tables
      • Tbar (Toolbar)
      • Timelines
      • Toggle Switch
    • Page Examples
      • Card View Template
      • Document Upload
      • List View Template
      • Table View Template
      • Users and Organizations
  • News

Forms

Description

Forms obtain user data and transmit it to the system to either store the data, produce an action, or both.

Check the Lexicon Forms Pattern for a more in-depth look at the motivations and proper usage of this component.

Layout

One single form

Sheet Title

Sheet text should be used for any kind of explanatory text. The Sheet Title and Sheet Text are contained inside a sheet-header.
<div class="sheet sheet-lg">
	<div class="sheet-header">
		<h2 class="sheet-title">Sheet Title</h2>
		<div class="sheet-text">Sheet text should be used for any kind of explanatory text. The Sheet Title and Sheet Text are contained inside a sheet-header.</div>
	</div>
	<div class="sheet-section">
		<div class="form-group">
			<label for="basicInputTypeText">
				Screen Name
				<span class="reference-mark">
					<svg class="lexicon-icon lexicon-icon-asterisk" focusable="false" role="presentation">
						<use href="/images/icons/icons.svg#asterisk" />
					</svg>
				</span>
			</label>
			<input class="form-control" id="basicInputTypeText" placeholder="Placeholder" type="text"/>
		</div>
		<div class="form-group">
			<label for="basicInputTypeEmail">Email</label>
			<input class="form-control" id="basicInputTypeEmail" type="email"/>
		</div>
		<div class="form-group">
			<label for="basicInputTypeText">Name</label>
			<input class="form-control" id="basicInputTypeText" placeholder="Name" type="text"/>
		</div>
		<div class="form-group">
			<label for="basicInputTypeText">Birthday</label>
			<input class="form-control" id="basicInputTypeText" placeholder="Placeholder" type="text" value="01/01/1970"/>
		</div>
		<div class="form-group">
			<label for="basicInputTypeText">Gender</label>
			<input class="form-control" id="basicInputTypeText" placeholder="Gender" type="text"/>
		</div>
		<div class="form-group">
			<label for="basicInputTypeText">Job Title</label>
			<input class="form-control" id="basicInputTypeText" placeholder="Job Title" type="text"/>
		</div>
	</div>
	<div class="sheet-footer sheet-footer-btn-block-sm-down">
		<div class="btn-group">
			<div class="btn-group-item">
				<button class="btn btn-primary" type="button">Primary</button>
			</div>
			<div class="btn-group-item">
				<button class="btn btn-secondary" type="button">Secondary</button>
			</div>
		</div>
	</div>
</div>

Two columns form

Sheet Title

Sheet text should be used for any kind of explanatory text. The Sheet Title and Sheet Text are contained inside a sheet-header.
<div class="sheet sheet-lg">
	<div class="sheet-header">
		<h2 class="sheet-title">Sheet Title</h2>
		<div class="sheet-text">Sheet text should be used for any kind of explanatory text. The Sheet Title and Sheet Text are contained inside a sheet-header.</div>
	</div>
	<div class="sheet-section">
		<div class="form-group-autofit">
			<div class="form-group-item">
				<label for="basicInputTypeText">
					Screen Name
					<span class="reference-mark">
						<svg class="lexicon-icon lexicon-icon-asterisk" focusable="false" role="presentation">
							<use href="/images/icons/icons.svg#asterisk" />
						</svg>
					</span>
				</label>
				<input class="form-control" id="basicInputTypeText" placeholder="Placeholder" type="text"/>
			</div>
			<div class="form-group-item">
				<label for="basicInputTypeText">Birthday</label>
				<input class="form-control" id="basicInputTypeText" placeholder="Placeholder" type="text" value="01/01/1970"/>
			</div>
		</div>
		<div class="form-group-autofit">
			<div class="form-group-item">
				<label for="basicInputTypeEmail">Email</label>
				<input class="form-control" id="basicInputTypeEmail" type="email"/>
			</div>
			<div class="form-group-item">
				<label for="basicInputTypeText">Gender</label>
				<input class="form-control" id="basicInputTypeText" placeholder="Gender" type="text"/>
			</div>
		</div>
		<div class="form-group-autofit">
			<div class="form-group-item">
				<label for="basicInputTypeText">Name</label>
				<input class="form-control" id="basicInputTypeText" placeholder="Name" type="text"/>
			</div>
			<div class="form-group-item">
				<label for="basicInputTypeText">Job Title</label>
				<input class="form-control" id="basicInputTypeText" placeholder="Job Title" type="text"/>
			</div>
		</div>
	</div>
	<div class="sheet-footer sheet-footer-btn-block-sm-down">
		<div class="btn-group">
			<div class="btn-group-item">
				<button class="btn btn-primary" type="button">Primary</button>
			</div>
			<div class="btn-group-item">
				<button class="btn btn-secondary" type="button">Secondary</button>
			</div>
		</div>
	</div>
</div>

Except as otherwise noted, the content of this site is licensed under CC BY-SA 4.0 license.