Skip to content

Instantly share code, notes, and snippets.

@colmtuite
Created August 7, 2012 14:40
Show Gist options
  • Save colmtuite/3285903 to your computer and use it in GitHub Desktop.
Save colmtuite/3285903 to your computer and use it in GitHub Desktop.
Error Form
<%= form_for @contact, validate: true do |f| %>
<fieldset>
<div class="input_error">
<%= f.label :message %>
<%= f.text_area :message, autofocus: 'autofocus' %>
<span data-icon="M" class="message">Error message goes here</span>
</div>
<div class="input_success">
<%= f.label :name %>
<%= f.text_field :name %>
<span data-icon="N" class="message">Success message goes here</span>
</div
<div>
<%= f.label :email %>
<%= f.text_field :email %>
</div>
<div>
<%= f.label :phone_number %>
<%= f.text_field :phone_number %>
</div>
</fieldset>
<%= f.submit class: "btn btn-big btn-action" %>
<% end %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment