plataformatec/simple_form — Issue #448: Outputting a fields value, not an input tag
Author: digitalplaywright
Created: 2012-02-11 23:15:51+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 [@event.space,@event, @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}