Created
January 14, 2014 21:02
-
-
Save kastman/8425640 to your computer and use it in GitHub Desktop.
Really Simple Contact Form View
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="row"> | |
<div class="col-md-12"> | |
<div class="page-header"> | |
<h1>Contact Us</h1> | |
</div> | |
<p>We can help you answer questions and solve problems. Fill out the following form and we'll be in touch shortly:</p> | |
</div> | |
<div class="row"> | |
<div class="col-md-12 well"> | |
<div class="col-md-3 col-md-offset-1" id='contact-form'> | |
<%= simple_form_for(@contact, html: {class:'form-horizontal'}) do |f| %> | |
<% if @contact.errors.any? %> | |
<div id="error_explanation"> | |
<h2><%= pluralize(@contact.errors.count, "error") %> prohibited this contact from being saved:</h2> | |
<ul> | |
<% @contact.errors.full_messages.each do |msg| %> | |
<li><%= msg %></li> | |
<% end %> | |
</ul> | |
</div> | |
<% end %> | |
<%= f.input :name, required: true %> | |
<%= f.input :email, required: true %> | |
<%= f.input :phone %> | |
<%= f.input :company, label: "Organization" %> | |
</div> | |
<div class="col-md-8"> | |
<%= f.input :message, required: true, input_html: {cols: 60, :rows => 6} %> | |
<%= f.button :submit, class: 'button small btn-primary', id: 'contact-button' %> | |
</div> | |
</div> | |
</div> | |
<% end %> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment