Updated form submission to use query population