From the course: Ajax with PHP: Add Dynamic Content to Websites

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Handle form errors

Handle form errors

From the course: Ajax with PHP: Add Dynamic Content to Websites

Start my 1-month free trial

Handle form errors

- [Instructor] In the previous movie, we were able to gather the form data, submit it via Ajax and display the result. You might think our project is done but before we declare it a total success, there are a few other aspects we should consider. There are three items related to the UX or User Experience which we should always consider when submitting forms via Ajax. The first is that we're going to need to consider how we want to handle form errors. Frequently, when we're submitting form data to the server, there's the possibility that something on the form is wrong, that some of the data is invalid and it needs to be fixed before the process could continue. We need to consider how we're going to handle reporting those form errors to the user so they can fix them and resubmit the data. The second is that we should indicate the loading status, especially when we're sending form data, it may take the server a little while to respond and we don't want the user to just think that our…

Contents