lailsonbm/awesome_nested_fields — Issue #4: awesome_nested_fields Add button unresponsive with some blueprint layouts
Author: ccheaton
Created: 2011-10-20 13:17:28+00:00
State: open

This took me a while to figure out. I'm using blueprint, Devise, and awesome_nested_fields on a new project. I stripped out most of the form elements here, so that you can see a simpler case of the add button not working. All else being equal, the awesome_nested_fields **Add** button does not work when I have the following layout on a page.

Look for the HTML comments on the 2nd and 5th lines. Remove those HTML elements and the awesome_nested_fields add button works again.

```erb

<%= form_for(resource, :as => resource_name, :url => registration_path(resource_name), :html => { :method => :put }) do |f| %>
<%= devise_error_messages! %>

Your Dependents

<%= f.nested_fields_for :people do |f| %>

<%= f.label :first_name %>
<%= f.text_field :first_name %>
remove
<%= f.hidden_field :id %>
<%= f.hidden_field :_destroy %>

<% end %>

add dependent

<%= f.label :current_password %> (we need your current password to confirm your changes)

<%= f.password_field :current_password, :class => "title" %>

<%= f.submit "Save Changes" %>

<% end %>

```