Reply To: Errors found in the form – Cannot accept online reservations.


Thanks for the info. I added a response = response.trim(); in send_validate.js, and I verified the trim did work by alerting the output, but unfortunately, it did nothing to resolve the problem. Inspecting the network traffic, I see /wp-admin/admin-ajax.php receives this response. It appears to be an array. There are two leading blank lines. Maybe adding a trim here will help? The response data in the screenshot below is not the response variable in send_validate.js. Perhaps I can trim that data to fix it?

I had to take a screenshot of the returned data since it was stripped out in the forum.

I went ahead and disabled all WordPress plugins. Forgive me, I am new to WordPress. It appears that one of the plugins was responsible for the leading spaces. Given that this can happen in many setups, I would like to suggest that all ajax results are trimmed just in case. Especially the one that returns the success message, which was causing the issue here, as it prevents orders from error if a plugin has a space outside of the PHP tags. Everything else seemed to work.

Thank you for your assistance.