justinfrench/formtastic — Issue #797: Outputting value of a field in fields_for, not an input tag
Author: digitalplaywright
Created: 2012-02-11 23:19:41+00:00
State: open

I have a form for an object that accepts nested attributes and would like to access the value of the object that are currently being processed in fields_for. Is this possible?

I know how to generate a disabled input tag, but that is not a nice solution since I don't intend to edit this field.

Example code:

```
= semantic_form_for @order do |f|
= f.semantic_fields_for(:line_items) do |fr|
= fr.select "quantity", (1..10).step(1).to_a, :selected => 1
Price is: #{put vale of |fr|.price here}
```