When I add the 'Required' attribute
to html input fields, Rails pre-pends an asterisk (*) before the label.
Does anyone know how to prevent this?
For some reason Rails transforms this:
<%= f.input :Company, :input_html => {:value => "", :id => "company_name"}, :label => "company name" %>
into this:
<div class="input string required">
<label for="company_name" class="string required">
<abbr title="required">*</abbr> company name</label>
<input type="text" value="" size="50" required="required" name="lead[Company]" id="company_name" class="string required">
</div>
I don't like that it wraps everything in a DIV and adds an ABBR element to the party.
How can I prevent this?
question from:
https://stackoverflow.com/questions/7650689/rails-how-to-disable-asterisk-on-forms-required-fields 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…