I am trying to insert rows into a table I’ve set up based on user’s answers. I have made a child theme and a custom template for the page with the form. My issue is that I have no way of knowing what’s going wrong where and why the data isn’t being inserted. my js onclick function is as follows, and this file is called question_submit.js:
Here is where I enqueue the script:
And finally here is the function that’s binded to the action:
Both of these functions are in my child theme’s functions.php file. Right now I am using hard-coded values jsut to test the functionality, later these values will be dependent on the form answers.
When I click the submit button, there is no change in my table but also no php errors. There is no evidence of the ajax query going through on the XHR section of networks in development tools.
- Hiện tại chúng tôi có hơn 25 nghìn bài văn mẫu các thể loại.
- Kho tài liệu, đề thi học sinh giỏi các lớp vô cùng phong phú.
- Mỗi ngày cập nhật hơn 100 đề thi chất lượng từ các website bán tài liệu lớn.
Tải đề thi VIP với giá siêu rẻ tại Vip.Dethihsg247.Com