$('input[type="button"]').click( function(e) {
        e.preventDefault();
        form_functionality($(this).closest('form'));
      });