I am looking for a way to have a function that can be accessed by two different forms (1 popup modal with a form and a form in the footer). The problem I see Is that I can not simply use something like form, because on other pages there are alse forms available which should not access this function (maybe I don’t describe it in a right way?) This is how I normally would call the function:
$("#newsletterForm").on("submit", function(e) {
......
$.ajax({ etc
Where in this example this form is the form in the footer. At the same time I would like to be able to call the same function from the form in the modal