How to automatically pass url variable to a form?