Skip to content

Instantly share code, notes, and snippets.

@adamgreenhall
Last active December 20, 2015 01:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adamgreenhall/6051186 to your computer and use it in GitHub Desktop.
Save adamgreenhall/6051186 to your computer and use it in GitHub Desktop.
<form accept-charset="UTF-8" action="/pieces" class="simple_form form-horizontal" id="new_piece" method="post"><div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value="✓"><input name="authenticity_token" type="hidden"></div> <div class="input text optional piece_title"><label class="text optional" for="piece_title">Title</label><textarea class="text optional" id="piece_title" name="piece[title]"></textarea></div>
<div class="input string optional piece_cover_image field_with_hint"><label class="string optional" for="piece_cover_image">Cover image</label><input class="string optional" id="piece_cover_image" maxlength="255" name="piece[cover_image]" size="255" type="text"><span class="hint">url for image</span></div>
<div class="input integer optional piece_order"><label class="integer optional" for="piece_order">Order</label><input class="numeric integer optional" id="piece_order" name="piece[order]" step="1" type="number"></div>
<div class="input string optional piece_start_date field_with_hint"><label class="string optional" for="piece_start_date">Start date</label><input class="string optional" id="piece_start_date" maxlength="255" name="piece[start_date]" size="255" type="text"><span class="hint">a string describing when the project got started</span></div>
<div class="input string optional piece_end_date field_with_hint"><label class="string optional" for="piece_end_date">End date</label><input class="string optional" id="piece_end_date" maxlength="255" name="piece[end_date]" size="255" type="text"><span class="hint">optional</span></div>
<textarea hint="in markdown" id="piece_description" label="Description" name="piece[description]"></textarea>
<input class="button" name="commit" type="submit" value="Create Piece">
</form>
= simple_form_for @piece, :html => { :class => 'form-horizontal' } do |f|
=f.input :title
=f.input :cover_image, hint: 'url for image'
=f.input :order
=f.input :start_date, hint: 'a string describing when the project got started'
=f.input :end_date, hint: 'optional'
=f.text_area :description, hint: 'in markdown', label: 'Description'
=f.button :submit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment