Say I have a page with multiple forms on it. When one form has information input into it, all the elements of the other forms should be disabled.
I have tried selecting all the forms except the current one using .not(), then getting each input element using the :input selector and applying the disabled property to it, but when information is input, all the elements in all the forms get disabled regardless of which form was used.
$('form').on("input", ":input", function() { $('form').not(this).each(function() { $(this).find(':input').prop('disabled', true); }); }); Fiddle Link (Very messy, but just to demonstrate) When information is entered into any of the elements in the top form, all the elements in the bottom form should be disabled.