Assuming you're using jQuery, you can do something like that :
HTML :
<input type="hidden" id="sourcePage" name="sourcePage" />
jQuery :
$(document).ready(function(){ // if you didn't set it before
var docHref = document.URL;
$('#sourcePage').attr('value', docHref);
});
This will add the current URL to the value of an input, so you'll be able to send this data to your form.