How can I hide or modify the text of the labels that are displayed auto-magically via form_builder. For example, I only want the words, Your Business Name:, to be displayed, not, Name.
View code:
<%=f.fields_for :orgs do |orgs_f| %>
<div>Your Business Name:<br />
<%= orgs_f.text_field :name%></div>
<% end %>
Output:
Your Business Name:
Name
Test Company
Generated HTML Source:
<div>Your Business Name:<br />
<div class="control-group">
<label class="control-label"for="user_orgs_attributes_0_name">Name</label>
<div class="controls">
<input class="span3" id="user_orgs_attributes_0_name" name="user[orgs_attributes][0][name]" size="30" type="text" value="Test Company" />
</div></div></div>
Thanks in advance for your time and assistance.
You may have inadvertently asked a two-part question, which I’d advise against. (Your question should ask one specific question.)
I do know how to change the label, it’s quite simple:
<%= orgs_f.text_field :name, :label => "Your Business Name" %>