Page 1 of 1

Form with JS Validation is not Calling the Form Action

Posted: Tue Jan 28, 2014 8:16 pm
by JoefromPhilly
I have a form that is embedded in a Wordpress page. The form can be seen here:

http://yellowsheetcoupons.net/get-emailed-coupons/

The first three fields need to be input, then it is to call a processing page to store the data into my database. Right now, I just have a test page that should echo "Submitted".

The problem is that the PHP page never gets called. Any idea as to why? You can see the form code and the JS validation function if you go to the page.

Thanks,

- Joe

Re: Form with JS Validation is not Calling the Form Action

Posted: Tue Jan 28, 2014 9:38 pm
by requinix
It does get called... via AJAX. Your script is supposed to return (read: output) JSON that looks like

Code: Select all

{"status":"success"}

Code: Select all

{"status":"error","errors":[something]} // don't know what the "something" is supposed to be
It's doing that because you gave your form class=TTWForm - which seems to be necessary to make the form look the way it does so you can't just remove that.