Auto populate fields depending on the URL