Skip to content

Instantly share code, notes, and snippets.

@ef2k
Last active December 15, 2015 14:19
Show Gist options
  • Save ef2k/5273495 to your computer and use it in GitHub Desktop.
Save ef2k/5273495 to your computer and use it in GitHub Desktop.
sample usage html
<form id="sampleForm">
<input type="text" name="username" placeholder="Username"/>
<div id="username-error" class="help-inline cr-error"></div>
<input type="text" name="email" placeholder="Email"/>
<div id="email-error" class="help-inline cr-error"></div>
<input type="password" name="password1" placeholder="Password"/>
<div id="password1-error" class="help-inline cr-error"></div>
<input type="password" name="password2" placeholder="Confirm"/>
<div id="password2-error" class="help-inline cr-error"></div>
<h5>Select 1 or 2 of these newspapers</h5>
<label class='checkbox'>
<input type="checkbox" name="newsletters" value="nyt"/>
New York Times
</label>
<label class='checkbox'>
<input type="checkbox" name="newsletters" value="nyp"/>
New York Post
</label>
<label class='checkbox'>
<input type="checkbox" name="newsletters" value="ct"/>
Chicago Tribune
</label>
<div id="newsletters-error" class="cr-error"></div>
<h5>Some select options that are optional</h5>
<select name="selvalues">
<option value="val1" selected>Value One</option>
<option value="val2">Value Two</option>
<option value="val3">Value Three</option>
</select>
<h5>Select exactly 2 of these</h5>
<select name="multivalues" multiple="multiple">
<option value="val1" selected>Value One</option>
<option value="val2">Value Two</option>
<option value="val3">Value Three</option>
</select>
<div id="multivalues-error" class="help-inline cr-error"></div>
<h5>Upload an Image (jpg, png, gif) File</h5>
<input name='profileImage' type="file" />
<div id="profileImage-error" class="help-inline cr-error"></div>
<h5>Upload a Text or Markdown File</h5>
<input name='readmeFile' type="file" />
<div id="readmeFile-error" class="help-inline cr-error"></div>
<input type='submit' class='btn'/>
</form>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment