Using $("form") means every form on the page.
If you use $("form") to set/change something, it will affect ALL of the forms on the page.
e.g.
$('form').addclass('foo');
will add class='foo' to EVERY form.
If you use $("form") to GET something, you will get it from the FIRST form on the page.
$('form').attr('href')
will get the href attribute of the FIRST form on the page.
If you had, say, a:
$(document).on('submit', 'form', function() {
var $form = $(this);
var id = $form.closest('section').attr('id');
}
Then this is set to a jQuery of the forum that was submitted.
We can't guess if you have some submit callback, though, since you never showed us any code or where you are trying to find the "nearestt" section from.