Skip to content

Commit

Permalink
Merge pull request #2490 from SuperMasterBlasterLaser/nestedForms
Browse files Browse the repository at this point in the history
Little fix for nested forms
  • Loading branch information
mshibuya committed Nov 27, 2015
2 parents 2a79811 + ee93a12 commit 02a5e58
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,6 @@ $(document).on 'nested:fieldRemoved', 'form', (content) ->
add_button = toggler.next()
add_button.addClass('add_nested_fields').html(add_button.data('add-label'))

# Removing all required attributes from deleted child form to bypass browser validations.
field.find('[required]').each ->
$(this).removeAttr('required')

0 comments on commit 02a5e58

Please sign in to comment.