Replace query on form page