Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Bootstrap
bootstrap
Commits
dfd52291
Commit
dfd52291
authored
7 years ago
by
Mark Otto
Browse files
Options
Download
Plain Diff
Merge branch 'v4-dev' of
https://github.com/jipexu/bootstrap
into jipexu-v4-dev
parents
fceffd16
63828f0c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
docs/4.0/components/forms.md
+17
-17
docs/4.0/components/forms.md
with
17 additions
and
17 deletions
+17
-17
docs/4.0/components/forms.md
+
17
-
17
View file @
dfd52291
...
@@ -138,15 +138,15 @@ If you want to have `<input readonly>` elements in your form styled as plain tex
...
@@ -138,15 +138,15 @@ If you want to have `<input readonly>` elements in your form styled as plain tex
{% example html %}
{% example html %}
<form
class=
"form-inline"
>
<form
class=
"form-inline"
>
<div
class=
"form-group"
>
<div
class=
"form-group
mb-2
"
>
<label
for=
"staticEmail2"
class=
"sr-only"
>
Email
</label>
<label
for=
"staticEmail2"
class=
"sr-only"
>
Email
</label>
<input type="text" readonly class="form-control-plaintext" id="staticEmail2" value="email@example.com">
<input type="text" readonly class="form-control-plaintext" id="staticEmail2" value="email@example.com">
</div>
</div>
<div
class=
"form-group mx-sm-3"
>
<div
class=
"form-group mx-sm-3
mb-2
"
>
<label
for=
"inputPassword2"
class=
"sr-only"
>
Password
</label>
<label
for=
"inputPassword2"
class=
"sr-only"
>
Password
</label>
<input
type=
"password"
class=
"form-control"
id=
"inputPassword2"
placeholder=
"Password"
>
<input
type=
"password"
class=
"form-control"
id=
"inputPassword2"
placeholder=
"Password"
>
</div>
</div>
<button
type=
"submit"
class=
"btn btn-primary"
>
Confirm identity
</button>
<button
type=
"submit"
class=
"btn btn-primary
mb-2
"
>
Confirm identity
</button>
</form>
</form>
{% endexample %}
{% endexample %}
...
@@ -477,24 +477,24 @@ The example below uses a flexbox utility to vertically center the contents and c
...
@@ -477,24 +477,24 @@ The example below uses a flexbox utility to vertically center the contents and c
<div
class=
"form-row align-items-center"
>
<div
class=
"form-row align-items-center"
>
<div
class=
"col-auto"
>
<div
class=
"col-auto"
>
<label
class=
"sr-only"
for=
"inlineFormInput"
>
Name
</label>
<label
class=
"sr-only"
for=
"inlineFormInput"
>
Name
</label>
<input
type=
"text"
class=
"form-control mb-2
mb-sm-0
"
id=
"inlineFormInput"
placeholder=
"Jane Doe"
>
<input
type=
"text"
class=
"form-control mb-2"
id=
"inlineFormInput"
placeholder=
"Jane Doe"
>
</div>
</div>
<div
class=
"col-auto"
>
<div
class=
"col-auto"
>
<label
class=
"sr-only"
for=
"inlineFormInputGroup"
>
Username
</label>
<label
class=
"sr-only"
for=
"inlineFormInputGroup"
>
Username
</label>
<div
class=
"input-group mb-2
mb-sm-0
"
>
<div
class=
"input-group mb-2"
>
<div
class=
"input-group-addon"
>
@
</div>
<div
class=
"input-group-addon"
>
@
</div>
<input
type=
"text"
class=
"form-control"
id=
"inlineFormInputGroup"
placeholder=
"Username"
>
<input
type=
"text"
class=
"form-control"
id=
"inlineFormInputGroup"
placeholder=
"Username"
>
</div>
</div>
</div>
</div>
<div
class=
"col-auto"
>
<div
class=
"col-auto"
>
<div
class=
"form-check mb-2
mb-sm-0
"
>
<div
class=
"form-check mb-2"
>
<label
class=
"form-check-label"
>
<label
class=
"form-check-label"
>
<input
class=
"form-check-input"
type=
"checkbox"
>
Remember me
<input
class=
"form-check-input"
type=
"checkbox"
>
Remember me
</label>
</label>
</div>
</div>
</div>
</div>
<div
class=
"col-auto"
>
<div
class=
"col-auto"
>
<button
type=
"submit"
class=
"btn btn-primary"
>
Submit
</button>
<button
type=
"submit"
class=
"btn btn-primary
mb-2
"
>
Submit
</button>
</div>
</div>
</div>
</div>
</form>
</form>
...
@@ -537,7 +537,7 @@ And of course [custom form controls](#custom-forms) are supported.
...
@@ -537,7 +537,7 @@ And of course [custom form controls](#custom-forms) are supported.
<div
class=
"form-row align-items-center"
>
<div
class=
"form-row align-items-center"
>
<div
class=
"col-auto"
>
<div
class=
"col-auto"
>
<label
class=
"mr-sm-2"
for=
"inlineFormCustomSelect"
>
Preference
</label>
<label
class=
"mr-sm-2"
for=
"inlineFormCustomSelect"
>
Preference
</label>
<select
class=
"custom-select mb-2 mr-sm-2
mb-sm-0
"
id=
"inlineFormCustomSelect"
>
<select
class=
"custom-select mb-2 mr-sm-2"
id=
"inlineFormCustomSelect"
>
<option
selected
>
Choose...
</option>
<option
selected
>
Choose...
</option>
<option
value=
"1"
>
One
</option>
<option
value=
"1"
>
One
</option>
<option
value=
"2"
>
Two
</option>
<option
value=
"2"
>
Two
</option>
...
@@ -545,14 +545,14 @@ And of course [custom form controls](#custom-forms) are supported.
...
@@ -545,14 +545,14 @@ And of course [custom form controls](#custom-forms) are supported.
</select>
</select>
</div>
</div>
<div
class=
"col-auto"
>
<div
class=
"col-auto"
>
<label
class=
"custom-control custom-checkbox mb-2 mr-sm-2
mb-sm-0
"
>
<label
class=
"custom-control custom-checkbox mb-2 mr-sm-2"
>
<input
type=
"checkbox"
class=
"custom-control-input"
>
<input
type=
"checkbox"
class=
"custom-control-input"
>
<span
class=
"custom-control-indicator"
></span>
<span
class=
"custom-control-indicator"
></span>
<span
class=
"custom-control-description"
>
Remember my preference
</span>
<span
class=
"custom-control-description"
>
Remember my preference
</span>
</label>
</label>
</div>
</div>
<div
class=
"col-auto"
>
<div
class=
"col-auto"
>
<button
type=
"submit"
class=
"btn btn-primary"
>
Submit
</button>
<button
type=
"submit"
class=
"btn btn-primary
mb-2
"
>
Submit
</button>
</div>
</div>
</div>
</div>
</form>
</form>
...
@@ -571,21 +571,21 @@ You may need to manually address the width and alignment of individual form cont
...
@@ -571,21 +571,21 @@ You may need to manually address the width and alignment of individual form cont
{% example html %}
{% example html %}
<form
class=
"form-inline"
>
<form
class=
"form-inline"
>
<label
class=
"sr-only"
for=
"inlineFormInputName2"
>
Name
</label>
<label
class=
"sr-only"
for=
"inlineFormInputName2"
>
Name
</label>
<input
type=
"text"
class=
"form-control mb-2 mr-sm-2
mb-sm-0
"
id=
"inlineFormInputName2"
placeholder=
"Jane Doe"
>
<input
type=
"text"
class=
"form-control mb-2 mr-sm-2"
id=
"inlineFormInputName2"
placeholder=
"Jane Doe"
>
<label
class=
"sr-only"
for=
"inlineFormInputGroupUsername2"
>
Username
</label>
<label
class=
"sr-only"
for=
"inlineFormInputGroupUsername2"
>
Username
</label>
<div
class=
"input-group mb-2 mr-sm-2
mb-sm-0
"
>
<div
class=
"input-group mb-2 mr-sm-2"
>
<div
class=
"input-group-addon"
>
@
</div>
<div
class=
"input-group-addon"
>
@
</div>
<input
type=
"text"
class=
"form-control"
id=
"inlineFormInputGroupUsername2"
placeholder=
"Username"
>
<input
type=
"text"
class=
"form-control"
id=
"inlineFormInputGroupUsername2"
placeholder=
"Username"
>
</div>
</div>
<div
class=
"form-check mb-2 mr-sm-2
mb-sm-0
"
>
<div
class=
"form-check mb-2 mr-sm-2"
>
<label
class=
"form-check-label"
>
<label
class=
"form-check-label"
>
<input
class=
"form-check-input"
type=
"checkbox"
>
Remember me
<input
class=
"form-check-input"
type=
"checkbox"
>
Remember me
</label>
</label>
</div>
</div>
<button
type=
"submit"
class=
"btn btn-primary"
>
Submit
</button>
<button
type=
"submit"
class=
"btn btn-primary
mb-2
"
>
Submit
</button>
</form>
</form>
{% endexample %}
{% endexample %}
...
@@ -594,20 +594,20 @@ Custom form controls and selects are also supported.
...
@@ -594,20 +594,20 @@ Custom form controls and selects are also supported.
{% example html %}
{% example html %}
<form
class=
"form-inline"
>
<form
class=
"form-inline"
>
<label
class=
"mr-sm-2"
for=
"inlineFormCustomSelectPref"
>
Preference
</label>
<label
class=
"mr-sm-2"
for=
"inlineFormCustomSelectPref"
>
Preference
</label>
<select
class=
"custom-select mb-2 mr-sm-2
mb-sm-0
"
id=
"inlineFormCustomSelectPref"
>
<select
class=
"custom-select mb-2 mr-sm-2"
id=
"inlineFormCustomSelectPref"
>
<option
selected
>
Choose...
</option>
<option
selected
>
Choose...
</option>
<option
value=
"1"
>
One
</option>
<option
value=
"1"
>
One
</option>
<option
value=
"2"
>
Two
</option>
<option
value=
"2"
>
Two
</option>
<option
value=
"3"
>
Three
</option>
<option
value=
"3"
>
Three
</option>
</select>
</select>
<label
class=
"custom-control custom-checkbox mb-2 mr-sm-2
mb-sm-0
"
>
<label
class=
"custom-control custom-checkbox mb-2 mr-sm-2"
>
<input
type=
"checkbox"
class=
"custom-control-input"
>
<input
type=
"checkbox"
class=
"custom-control-input"
>
<span
class=
"custom-control-indicator"
></span>
<span
class=
"custom-control-indicator"
></span>
<span
class=
"custom-control-description"
>
Remember my preference
</span>
<span
class=
"custom-control-description"
>
Remember my preference
</span>
</label>
</label>
<button
type=
"submit"
class=
"btn btn-primary"
>
Submit
</button>
<button
type=
"submit"
class=
"btn btn-primary
mb-2
"
>
Submit
</button>
</form>
</form>
{% endexample %}
{% endexample %}
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment