I have some javascript that submits to an HTML form in my app upon a "click" event like so....

```
google.maps.event.addListener(marker, 'click', function() {
  $('form').submit()
});

```

However I want to change the data before I send it. Is this possible? I don't want to use Ajax $.post if I can help it. I just want to change what the form sends to my Rails controller before submit.

Thanks!