Skip to content

Instantly share code, notes, and snippets.

@bob
Created January 10, 2011 10:11
Show Gist options
  • Save bob/772615 to your computer and use it in GitHub Desktop.
Save bob/772615 to your computer and use it in GitHub Desktop.
internationalized form control label with custom id (in case when you can't change id of control)
<%= f.label :link, nil, {:for => "link"} %>
<%= f.text_field :link, {:id => "link"} %>
gives
<label for="link">Link to this product in your e-shop</label>
<input type="text" value="" size="30" name="widget_products_data[link]" id="link">
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment