nested_form
nested_form copied to clipboard
Fix for Issue #262: 'is not focusable' error
link_to_delete now hides the form element and also removes the 'required' attribute on any children of the field being deleted.
field.find('*').removeAttr('required');
Whilst waiting this JS work-around gets you going again:
$(document).on('nested:fieldRemoved', function(event){
event.field.find('*').removeAttr('required');
});
Could you please update Prototype version too?
Just add this to your assets/javascripts/application.js at it will fix this:
jQuery(function ($) {
$(document).on('nested:fieldRemoved', function (event) {
$('[required]', event.field).removeAttr('required');
});
});