We have errors in the form. If ajax, return them as json.
        Otherwise, proceed as normal.

def form_invalid(self, form):
        """
        We have errors in the form. If ajax, return them as json.
        Otherwise, proceed as normal.
        """
        if self.request.is_ajax():
            return self.render_json_response(self.get_error_result(form))
        return super(AjaxFormMixin, self).form_invalid(form)