2 ms·
If I'm client side, as well as server side checking inputs with JSON responses, there is going to be overlapping of work. Particularly annoying when carrying ov
by overcast 8y ago
If I'm client side, as well as server side checking inputs with JSON responses, there is going to be overlapping of work. Particularly annoying when carrying over field/errors across submit pages. Old school submit, check, refresh, show errors, is an ugly experience for end users.
Of course it can be done, not something I'm going to worry about as a solo operating and developing multiple ventures.
- prophesi 8y agoSure, it requires some careful planning. You'd set up the html form with method="post". Then have the AJAX send the request with its content type as "application/x-www-form-urlencoded". At least with Node Express, that will have the requests handled the same.
- overcast 8y agoI understand how this works, I've built a billion products by this point. It's much easier and user friendly to post the form through AJAX, get a JSON response on success or an array of error codes for each field. Dealing with error messages and passing around form information is not something I want to deal with any longer in OG form submit.
- prophesi 8y agoAlright. To each their own.