3.2 - Form
Source: organisms/_form.scss, line 17
.form
default styling. It removes the margin bottom of the last .form-group
.is-valid - Form group is valid .has-error - Form group has error
Example:
<form class="form">
<div class="form-group">
<label for="exampleEmail1">Email address</label>
<input type="email" id="exampleEmail1" aria-describedby="emailHelp" placeholder="Enter email">
<p id="emailHelp" class="form-text mb-0">We'll never share your email with anyone else.</p>
<p class="form-text has-error">Opps, please enter a valid email.</p>
<p class="form-text is-valid">Email is valid.</p>
</div>
<div class="form-group">
<label for="message1">Your message</label>
<textarea id="message1" placeholder="Your message"></textarea>
<p class="form-text has-error">Opps, please enter a message.</p>
<p class="form-text is-valid">Message is valid.</p>
</div>
<div class="form-group">
<label>Select an option</label>
<select>
<option selected="true" disabled>Select dropdown</option>
<option value="option1">option1</option>
<option value="option2">option2</option>
<option value="option3">option3</option>
<option value="option4">option4</option>
</select>
<p class="form-text has-error">Opps, please select a value.</p>
<p class="form-text is-valid">input is valid.</p>
</div>
<div class="form-group">
<label>What do you thing?</label>
<div class="input-group">
<label class="input-label"><input type="radio" name="test7" value="radio1"> Yes</label>
<label class="input-label"><input type="radio" name="test7" value="radio2"> No</label>
<label class="input-label"><input type="radio" name="test7" value="radio3"> Not sure</label>
</div>
<p class="form-text has-error">Opps, please check.</p>
<p class="form-text is-valid">input is valid.</p>
</div>
<div class="form-group">
<label>Do you agree?</label>
<div>
<label class="input-label"><input type="checkbox" name="test8" value="checkbox"> I agree with <a href="#">Terms and conditions</a></label>
</div>
<p class="form-text has-error">Opps, please check.</p>
<p class="form-text is-valid">input is valid.</p>
</div>
<div class="form-group">
<button type="submit" class="btn is-primary">Submit</button>
<button type="reset">Clear</button>
</div>
</form>