Store the query string in the anchor on form submit.