all AJAX and javascript for the form submission functional with text input