Communictes with backend now, but I think because of using a form is terrible, still getting issues with cors, but I don't think its cors.
Added a bit of logging.
Added return false to form submit function.
This works with the backend now.