EDIT: Disregard this post!! I was dynamically changing the action after the first submit then not returning JSON. It didn't like that.
Hi. First-timer here. Lovin GC!
After successfully adding a new item, the form fields are emptied and the message "Your data has been successfully stored into the database" appears. All seems lovely, but when I populate the fields again with new data, and try to submit, I get a js error.
// The js error is "Uncaught SyntaxError: Unexpected token <" which when clicked reveals only the '<html lang="en">' line from the main page. // This probably won't help much but the js debugger stops at the following "return" line of the jquery min page. if (a.JSON && a.JSON.parse) return a.JSON.parse(b + "");
I suspect there's something fishy with the ajax state maybe? I really have no idea, but I'm figuring if grocerycart is loading an empty form after a successful submission then the intent must be for that new form to work as well.