Is there a way or is it possible to save in the database the value of the label tag?
<div class="field">
<%= f.label :cust_name %><br />
<div><label id="cust_name" name="delivery_receipt[cust_name]"></label>
</div>
</div>
Is there a way or is it possible to save in the database the value of the label tag?
<div class="field">
<%= f.label :cust_name %><br />
<div><label id="cust_name" name="delivery_receipt[cust_name]"></label>
</div>
</div>
Typically you would have the label and the input field alongside each other:
<%= f.label :cust_name %>
<%= f.text_field :cust_name %>
This would display the label and an input field. The value entered by the user will be saved against cust_name
in the DB.
Value of f.label
The value of f.label would simply be the symbol name (cust_name). This should be the name of one of your model attributes so generally you wouldn't want to save this to the DB.