causeway-standard-theme
Version:
712 lines (663 loc) • 34.6 kB
HTML
<div class="container page">
<div class="content pane single-pane">
<section>
<a id="forms"></a>
<header class="content-header">
<h1 class="title">
Forms
</h1>
<ul class="nav nav-pills">
<li>
<a href="/docs/forms.html#forms-text">
Text
</a>
</li>
<li>
<a href="/docs/forms.html#forms-textarea">
Textarea
</a>
</li>
<li>
<a href="/docs/forms.html#forms-password">
Password
</a>
</li>
<li class="dropdown">
<a href="/docs/select.html#forms-select" data-hover="dropdown">
Select
<span class="fa fa-chevron-down"></span>
</a>
<ul class="dropdown-menu">
<li>
<a href="/docs/select.html#forms-select-single">
Single Choice
</a>
</li>
<li>
<a href="/docs/select.html#forms-select-multiple">
Multiple Choice
</a>
</li>
</ul>
</li>
<li>
<a href="/docs/forms.html#forms-file">
File
</a>
</li>
<li class="dropdown">
<a href="/docs/date.html#forms-date" data-hover="dropdown">
Date
<span class="fa fa-chevron-down"></span>
</a>
<ul class="dropdown-menu">
<li>
<a href="/docs/date.html#forms-date-single">
Single Date
</a>
</li>
<li>
<a href="/docs/date.html#forms-date-range">
Date Range
</a>
</li>
</ul>
</li>
<li>
<a href="/docs/forms.html#forms-email">
Email
</a>
</li>
<li>
<a href="/docs/forms.html#forms-hyperlink">
Hyperlink
</a>
</li>
<li>
<a href="/docs/forms.html#forms-telephone">
Telephone
</a>
</li>
<li>
<a href="/docs/forms.html#forms-checkbox">
Checkbox
</a>
</li>
<li>
<a href="/docs/forms.html#forms-tristate">
Tristate
</a>
</li>
<li>
<a href="/docs/forms.html#forms-radio">
Radiobutton
</a>
</li>
<li>
<a href="/docs/forms.html#forms-time">
Time
</a>
</li>
<li>
<a href="/docs/forms.html#forms-color">
Color
</a>
</li>
<li>
<a href="/docs/forms.html#forms-currency">
Currency
</a>
</li>
<li>
<a href="/docs/forms.html#forms-image">
Image
</a>
</li>
<li>
<a href="/docs/forms.html#spinbox">
Spinbox
</a>
</li>
<li>
<a href="/docs/forms.html#forms-advanced-listbox">
Advanced Listbox
</a>
</li>
<li>
<a href="/docs/forms.html#forms-select-shuttle">
Select Shuttle
</a>
</li>
</ul>
</header>
<p>
Forms comprise of a surround and controlled by optional attribute. The attribute appears in the opening <code><form></code> tag. The form tags should surround any content containing form controls but should not contain any child <code><form></code> tags. A single row on a form should be contained by a div with a class of <code>"form-group"</code> as shown in the example below.
</p>
<pre><code>
<form role="form">
<div class="form-group">
<label for="inputField1"></label>
<input type="text" class="form-control" id="inputField1"/>
</div>
</form>
</code></pre>
<br/>
<header class="content-header">
<div class="row">
<div class="col-sm-8">
<h2 class="title">
A complex form example
</h2>
</div>
<div class="col-sm-4">
<button id="condense-form" class="pull-right btn btn-default">Condense</button>
</div>
</div>
</header>
<form id="tobeCondensed">
<div class="row">
<div class="col-md-6">
<div class="form-group invalid error">
<label for="userName">User Name:</label>
<input type="text" id="userName" class="form-control" placeholder="Enter username">
<span class="error-message">Error Message</span>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label for="password">Password:</label>
<input type="password" id="password" class="form-control" placeholder="Enter Password">
</div>
</div>
</div>
<div class="form-group invalid error-hover">
<label for="email">Email:</label>
<input type="email" id="email" class="form-control" placeholder="Enter Email Address">
<span class="error-message">Error Message</span>
</div>
<div class="form-group invalid error-hover">
<label for="email">Text Area:</label>
<textarea placeholder="Enter text" name="textarea" id="textarea" rows="5" class="form-control"></textarea>
<span class="error-message">Error Message for textarea</span>
</div>
<div class="form-group invalid error-hover">
<label for="selectMenu">Select Menu:</label>
<div class="select">
<select id="selectMenu" class="form-control">
<option value="">All</option>
<option value=""></option>
<option value="A">Order Acknowledgement</option>
<option value="BR">Bulk Upload Response</option>
<option value="D">Dispatch Note</option>
<option value="I" selected="selected">Invoice</option>
<option value="LU">Lookup File</option>
<option value="O">Order</option>
<option value="P">PCard</option>
<option value="PR">PCard Response</option>
<option value="PT">Pass Through File</option>
<option value="Q">Query</option>
<option value="R">Requisition</option>
<option value="RM">Remittance</option>
<option value="SM">Status</option>
<option value="S">Statement</option>
</select>
<span class="error-message">Error Message for select</span>
</div>
</div>
<div class="form-group">
<label for="selectMenu2">Select Menu 2:</label>
<div class="select">
<select id="selectMenu2" class="form-control">
<option value="send">Send</option>
<option value="recv">Receive</option>
</select>
</div>
</div>
<div class="form-group invalid error-hover">
<label>This has an error:</label>
<div class="checkbox">
<input type="checkbox" id="errorMessage">
<label for="errorMessage"><span class="checkbox-icon"></span></label>
<span class="error-message" data-original-title="" title="">Error Message for checkbox</span>
</div>
</div>
<div class="form-group">
<label>Reporting Days: </label>
<div class="checkbox-input-group">
<div class="checkbox-inline">
<input type="checkbox" id="sun">
<label for="sun"><span class="checkbox-icon"></span>Sun</label>
</div>
<div class="checkbox-inline">
<input type="checkbox" id="mon">
<label for="mon"><span class="checkbox-icon"></span>Mon</label>
</div>
<div class="checkbox-inline">
<input type="checkbox" id="tue">
<label for="tue"><span class="checkbox-icon"></span>Tue</label>
</div>
<div class="checkbox-inline">
<input type="checkbox" id="wed">
<label for="wed"><span class="checkbox-icon"></span>Wed</label>
</div>
<div class="checkbox-inline">
<input type="checkbox" id="thu">
<label for="thu"><span class="checkbox-icon"></span>Thu</label>
</div>
<div class="checkbox-inline">
<input type="checkbox" id="fri">
<label for="fri"><span class="checkbox-icon"></span>Fri</label>
</div>
<div class="checkbox-inline">
<input type="checkbox" id="sat">
<label for="sat"><span class="checkbox-icon"></span>Sat</label>
</div>
</div>
</div>
<div class="form-group time">
<label for="reportingInterval">Reporting Interval:</label>
<div class="input-group">
<input type="text" id="reportingInterval" class="form-control">
<span class="input-group-addon"><span class="fa fa-clock-o"></span></span>
</div>
</div>
<div class="form-group time">
<label for="startTime">Start Time:</label>
<div class="input-group">
<input type="text" id="startTime" class="form-control">
<span class="input-group-addon"><span class="fa fa-clock-o"></span></span>
</div>
</div>
<div class="form-group has-addon">
<label for="finishTime">Add on Example:</label>
<div class="input-group">
<input type="text" id="finishTime" class="form-control">
<span class="input-group-addon"><span class="fa fa-star"></span></span>
</div>
</div>
<div class="form-group date">
<label for="finishDate">Date Example:</label>
<div class="input-group">
<input type="text" id="finishDate" class="form-control">
<span class="input-group-addon"><span class="fa fa-calendar"></span></span>
</div>
</div>
<div class="form-group">
<label for="disabled">Disabled:</label>
<input type="text" id="disabled" class="form-control" disabled="disabled"
value="Readonly text fields cut off text. need to display all text. Readonly text fields cut off text. need to display all text. need to display all text">
</div>
<div class="form-group">
<label for="readonly">Readonly Example:</label>
<input type="text" id="readonly" class="form-control readonly"
value="Readonly text fields cut off text. need to display all text. Readonly text fields cut off text. need to display all text. need to display all text"
readonly="readonly">
</div>
<div class="form-group">
<label for="readonly2">Readonly Example 2:</label>
<input type="text" id="readonly2" class="form-control readonly"
value="Readonly text fields cut off text.. need to display all text. " readonly="readonly">
</div>
<div class="form-group">
<label for="readonly3">Readonly Example 3:</label>
<textarea name="readonly3" id="readonly3" class="form-control readonly" readonly="readonly">Readonly text fields cut off text. need to display all text.Readonly text fields cut off text. need to display all text.Readonly text fields cut off text. need to display all text.Readonly text fields cut off text. need to display all text.Readonly text fields cut off text. need to display all text.Readonly text fields cut off text. need to display all text.Readonly text fields cut off text. need to display all text.Readonly text fields cut off text. need to display all text.Readonly text fields cut off text. need to display all text.Readonly text fields cut off text. need to display all text.Readonly text fields cut off text. need to display all text.Readonly text fields cut off text. need to display all text.Readonly text fields cut off text. need to display all text.
</textarea>
</div>
<div class="form-group">
<label for="readonly4">Readonly Example 4:</label>
<textarea name="readonly4" id="readonly4" class="form-control readonly" readonly="readonly">Readonly text fields cut off text. need to display all text.Readonly text fields cut off text. need to display all text.Readonly text fields cut off text. need to display all text.Readonly text fields cut off text. need to display all text.
</textarea>
</div>
<div class="form-group">
<label for="fileUpload">File Upload</label>
<div class="file-input input-group">
<input type="file" class="form-control file-input-file sr-only" id="fileUpload" name="fileUpload">
<input type="hidden" class="file-input-remove" id="file-field1a-remove" name="file_field1a_remove"
value="0">
<input type="text" class="form-control file-input-text" id="fileUpload-text" placeholder="Path / Filename"
value="">
<span class="input-group-addon">
<label for="fileUpload" class="btn btn-text btn-file btn-file-choose">Choose File</label>
<button type="button" class="btn btn-text btn-file btn-file-remove">Remove</button>
</span>
</div>
</div>
<div class="form-group">
<div class="checkbox">
<input type="checkbox" id="attachCSV">
<label for="attachCSV"><span class="checkbox-icon"></span>Attach CSV Report:</label>
</div>
</div>
<div class="form-group invalid error-hover">
<label>My First Radio Buttons:</label>
<div class="radio-input-group">
<div class="radio-inline">
<input type="radio" class="form-control" id="radio1" name="firstRadio" value="">
<label for="radio1">
<span class="radio-icon"></span>
Option 1
</label>
</div>
<div class="radio-inline">
<input type="radio" class="form-control" id="radio2" name="firstRadio" value="">
<label for="radio2">
<span class="radio-icon"></span>
Option 2
</label>
</div>
<div class="radio-inline">
<input type="radio" class="form-control" id="radio3" name="firstRadio" value="">
<label for="radio3">
<span class="radio-icon"></span>
Option 3
</label>
</div>
<span class="error-message" data-original-title="" title="">Error Message for my first radio buttons.</span>
</div>
</div>
<div class="form-group invalid error-hover">
<label>My Second Radio Buttons:</label>
<div class="radio-input-group">
<div class="radio">
<input type="radio" class="form-control" id="radio4" name="secondRadio" value="">
<label for="radio4">
<span class="radio-icon"></span>
Option 1
</label>
</div>
<div class="radio">
<input type="radio" class="form-control" id="radio5" name="secondRadio" value="">
<label for="radio5">
<span class="radio-icon"></span>
Option 2
</label>
</div>
<div class="radio">
<input type="radio" class="form-control" id="radio6" name="secondRadio" value="">
<label for="radio6">
<span class="radio-icon"></span>
Option 3
</label>
</div>
<span class="error-message" data-original-title=""
title="">Error Message for my second radio buttons.</span>
</div>
</div>
</form>
<h2 class="title">Hover over error message code for above example</h2>
<p>Class <code>invalid</code> and <code>error-hover</code> should added to <code>.form-group</code> if there's an
error.</p>
<p>Inside <code>.control-input</code> and empty <code><span class="error-message">error message</span></code>
should be placed.</p>
<p><code><span class="error-message">error message</span></code> will remain hidden if the
parent <code>.form-group</code> doesn't have the class <code>invalid error-hover</code> which means there's no
error.</p>
<pre><code>
<form>
<div class="row">
<div class="col-md-6">
<div class="form-group invalid error">
<label for="userName">User Name:</label>
<input type="text" id="userName" class="form-control" placeholder="Enter username">
<span class="error-message">Error Message</span>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label for="password">Password:</label>
<input type="password" id="password" class="form-control" placeholder="Enter Password">
</div>
</div>
</div>
<div class="form-group invalid error-hover">
<label for="email">Email:</label>
<input type="email" id="email" class="form-control" placeholder="Enter Email Address">
<span class="error-message">Error Message</span>
</div>
<div class="form-group invalid error-hover">
<label for="email">Text Area:</label>
<textarea placeholder="Enter text" name="textarea" id="textarea" rows="5" class="form-control"></textarea>
<span class="error-message">Error Message for textarea</span>
</div>
<div class="form-group invalid error-hover">
<label for="selectMenu">Select Menu:</label>
<div class="select">
<select id="selectMenu" class="form-control">
<option value="">All</option>
<option value=""></option>
<option value="A">Order Acknowledgement</option>
<option value="BR">Bulk Upload Response</option>
<option value="D">Dispatch Note</option>
<option value="I" selected="selected">Invoice</option>
<option value="LU">Lookup File</option>
<option value="O">Order</option>
<option value="P">PCard</option>
<option value="PR">PCard Response</option>
<option value="PT">Pass Through File</option>
<option value="Q">Query</option>
<option value="R">Requisition</option>
<option value="RM">Remittance</option>
<option value="SM">Status</option>
<option value="S">Statement</option>
</select>
<span class="error-message">Error Message for select</span>
</div>
</div>
<div class="form-group">
<label for="selectMenu2">Select Menu 2:</label>
<div class="select">
<select id="selectMenu2" class="form-control">
<option value="send">Send</option>
<option value="recv">Receive</option>
</select>
</div>
</div>
<div class="form-group invalid error-hover">
<label>This has an error:</label>
<div class="checkbox">
<input type="checkbox" id="errorMessage">
<label for="errorMessage"><span class="checkbox-icon"></span></label>
<span class="error-message" data-original-title="" title="">Error Message for checkbox</span>
</div>
</div>
<div class="form-group">
<label>Reporting Days: </label>
<div class="checkbox-input-group">
<div class="checkbox-inline">
<input type="checkbox" id="sun">
<label for="sun"><span class="checkbox-icon"></span>Sun</label>
</div>
<div class="checkbox-inline">
<input type="checkbox" id="mon">
<label for="mon"><span class="checkbox-icon"></span>Mon</label>
</div>
<div class="checkbox-inline">
<input type="checkbox" id="tue">
<label for="tue"><span class="checkbox-icon"></span>Tue</label>
</div>
<div class="checkbox-inline">
<input type="checkbox" id="wed">
<label for="wed"><span class="checkbox-icon"></span>Wed</label>
</div>
<div class="checkbox-inline">
<input type="checkbox" id="thu">
<label for="thu"><span class="checkbox-icon"></span>Thu</label>
</div>
<div class="checkbox-inline">
<input type="checkbox" id="fri">
<label for="fri"><span class="checkbox-icon"></span>Fri</label>
</div>
<div class="checkbox-inline">
<input type="checkbox" id="sat">
<label for="sat"><span class="checkbox-icon"></span>Sat</label>
</div>
</div>
</div>
<div class="form-group time">
<label for="reportingInterval">Reporting Interval:</label>
<div class="input-group">
<input type="text" id="reportingInterval" class="form-control">
<span class="input-group-addon"><span class="fa fa-clock-o"></span></span>
</div>
</div>
<div class="form-group time">
<label for="startTime">Start Time:</label>
<div class="input-group">
<input type="text" id="startTime" class="form-control">
<span class="input-group-addon"><span class="fa fa-clock-o"></span></span>
</div>
</div>
<div class="form-group has-addon">
<label for="finishTime">Add on Example:</label>
<div class="input-group">
<input type="text" id="finishTime" class="form-control">
<span class="input-group-addon"><span class="fa fa-star"></span></span>
</div>
</div>
<div class="form-group date">
<label for="finishDate">Date Example:</label>
<div class="input-group">
<input type="text" id="finishDate" class="form-control">
<span class="input-group-addon"><span class="fa fa-calendar"></span></span>
</div>
</div>
<div class="form-group">
<label for="disabled">Disabled:</label>
<input type="text" id="disabled" class="form-control" disabled="disabled"
value="Readonly text fields cut off text. need to display all text. Readonly text fields cut off text. need to display all text. need to display all text">
</div>
<div class="form-group">
<label for="readonly">Readonly Example:</label>
<input type="text" id="readonly" class="form-control readonly"
value="Readonly text fields cut off text. need to display all text. Readonly text fields cut off text. need to display all text. need to display all text"
readonly="readonly">
</div>
<div class="form-group">
<label for="readonly2">Readonly Example 2:</label>
<input type="text" id="readonly2" class="form-control readonly"
value="Readonly text fields cut off text.. need to display all text. " readonly="readonly">
</div>
<div class="form-group">
<label for="readonly3">Readonly Example 3:</label>
<textarea name="readonly3" id="readonly3" class="form-control readonly" readonly="readonly">Readonly text fields cut off text. need to display all text.Readonly text fields cut off text. need to display all text.Readonly text fields cut off text. need to display all text.Readonly text fields cut off text. need to display all text.Readonly text fields cut off text. need to display all text.Readonly text fields cut off text. need to display all text.Readonly text fields cut off text. need to display all text.Readonly text fields cut off text. need to display all text.Readonly text fields cut off text. need to display all text.Readonly text fields cut off text. need to display all text.Readonly text fields cut off text. need to display all text.Readonly text fields cut off text. need to display all text.Readonly text fields cut off text. need to display all text.
</textarea>
</div>
<div class="form-group">
<label for="readonly4">Readonly Example 4:</label>
<textarea name="readonly4" id="readonly4" class="form-control readonly" readonly="readonly">Readonly text fields cut off text. need to display all text.Readonly text fields cut off text. need to display all text.Readonly text fields cut off text. need to display all text.Readonly text fields cut off text. need to display all text.
</textarea>
</div>
<div class="form-group">
<label for="fileUpload">File Upload</label>
<div class="file-input input-group">
<input type="file" class="form-control file-input-file sr-only" id="fileUpload" name="fileUpload">
<input type="hidden" class="file-input-remove" id="file-field1a-remove" name="file_field1a_remove"
value="0">
<input type="text" class="form-control file-input-text" id="fileUpload-text" placeholder="Path / Filename"
value="">
<span class="input-group-addon">
<label for="fileUpload" class="btn btn-text btn-file btn-file-choose">Choose File</label>
<button type="button" class="btn btn-text btn-file btn-file-remove">Remove</button>
</span>
</div>
</div>
<div class="form-group">
<div class="checkbox">
<input type="checkbox" id="attachCSV">
<label for="attachCSV"><span class="checkbox-icon"></span>Attach CSV Report:</label>
</div>
</div>
<div class="form-group invalid error-hover">
<label>My First Radio Buttons:</label>
<div class="radio-input-group">
<div class="radio-inline">
<input type="radio" class="form-control" id="radio1" name="firstRadio" value="">
<label for="radio1">
<span class="radio-icon"></span>
Option 1
</label>
</div>
<div class="radio-inline">
<input type="radio" class="form-control" id="radio2" name="firstRadio" value="">
<label for="radio2">
<span class="radio-icon"></span>
Option 2
</label>
</div>
<div class="radio-inline">
<input type="radio" class="form-control" id="radio3" name="firstRadio" value="">
<label for="radio3">
<span class="radio-icon"></span>
Option 3
</label>
</div>
<span class="error-message" data-original-title="" title="">Error Message for my first radio buttons.</span>
</div>
</div>
<div class="form-group invalid error-hover">
<label>My Second Radio Buttons:</label>
<div class="radio-input-group">
<div class="radio">
<input type="radio" class="form-control" id="radio4" name="secondRadio" value="">
<label for="radio4">
<span class="radio-icon"></span>
Option 1
</label>
</div>
<div class="radio">
<input type="radio" class="form-control" id="radio5" name="secondRadio" value="">
<label for="radio5">
<span class="radio-icon"></span>
Option 2
</label>
</div>
<div class="radio">
<input type="radio" class="form-control" id="radio6" name="secondRadio" value="">
<label for="radio6">
<span class="radio-icon"></span>
Option 3
</label>
</div>
<span class="error-message" data-original-title=""
title="">Error Message for my second radio buttons.</span>
</div>
</div>
</form>
</code></pre>
<br/>
<!--(bake form-fields/text-input.html)-->
<br/>
<!--(bake form-fields/textarea-input.html)-->
<br/>
<!--(bake form-fields/password-input.html)-->
<br/>
<!--(bake form-fields/file-input.html)-->
<br/>
<!--(bake form-fields/email-input.html)-->
<br/>
<!--(bake form-fields/link-input.html)-->
<br/>
<!--(bake form-fields/telephone-input.html)-->
<br/>
<!--(bake form-fields/checkbox-input.html)-->
<br/>
<!--(bake form-fields/tristate-input.html)-->
<br/>
<!--(bake form-fields/radio-input.html)-->
<br/>
<!--(bake form-fields/time-input.html)-->
<br/>
<!--(bake form-fields/image-input.html)-->
<br/>
<!--(bake form-fields/spinbox-input.html)-->
<br/>
<!--(bake form-fields/forms-color.html)-->
<br/>
<!--(bake form-fields/forms-currency.html)-->
<br/>
<!--(bake form-fields/advanced-listbox.html)-->
<br/>
<!--(bake form-fields/select-shuttle.html)-->
</section>
</div>
</div>