11 Apr 2012, 08:27
Romeo_pragsmall

Romeo Giezendanner (8 posts)

artflow/forms/app/views/creations/_form.v13.html.erb

<%= f.field_item :name do %>
  <%= f.text_field :name %>
<% end %>

artflow/forms/lib/application_form_builder.v1.rb

  def field_item(attribute, text = nil, &block)
    @template.content_tag :li do
      @template.concat @template.label(attribute, text)
      yield
    end
  end

The label is not show

30 Jan 2013, 23:51
Me-new-3_pragsmall

Aston J (18 posts)

Did you find out why Romeo? I’m getting the same thing.

31 Jan 2013, 16:24
_mg_2366_pragsmall

John M Athayde (39 posts)

Bruce suggested writing it like this:

https://gist.github.com/07aa5ff9d5bb3672a95a

Does that work for you? We’ll add this to the errata

31 Jan 2013, 20:25
Me-new-3_pragsmall

Aston J (18 posts)

Unfortunately that’s not working either John..

It looks like the label is being output as:

<label for="name_"></label>

Whereas it should be:

<label for="listing_name"></label>

(Where ‘listing’ is the name of the model)

31 Jan 2013, 20:29
_mg_2366_pragsmall

John M Athayde (39 posts)

ooo that’s fun. Hmm. Let me look at this with Bruce and see if we can figure out the issue.

  You must be logged in to comment