Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save midnightcodr/2760449 to your computer and use it in GitHub Desktop.
Save midnightcodr/2760449 to your computer and use it in GitHub Desktop.
A sample contact form using twitter bootstrap styling
<form class="well span8">
<div class="row">
<div class="span3">
<label>First Name</label>
<input type="text" class="span3" placeholder="Your First Name">
<label>Last Name</label>
<input type="text" class="span3" placeholder="Your Last Name">
<label>Email Address</label>
<div class="input-prepend">
<span class="add-on"><i class="icon-envelope"></i></span><input type="text" id="inputIcon" class="span2" style="width:233px" placeholder="Your email address">
</div>
<label>Subject
<select id="subject" name="subject" class="span3">
<option value="na" selected="">Choose One:</option>
<option value="service">General Customer Service</option>
<option value="suggestions">Suggestions</option>
<option value="product">Product Support</option>
</select>
</label>
</div>
<div class="span5">
<label>Message</label>
<textarea name="message" id="message" class="input-xlarge span5" rows="10"></textarea>
</div>
</div>
<button type="submit" class="btn btn-primary pull-right">Send</button>
</form>
@xeoncross
Copy link

For Bootstrap 3.x add class="form-control" to the inputs and role="form" to the <form>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment