The essence of the issue: user can create article, and, after filling required fields for a form
using AJAX is sent to server, but the problem is that this form can be submitted multiple times in a row and can get many of the same records. How to deal with it?
success: function (data) {
data = JSON.parse(data);
if (data['status'] == 'success') {
window.location.href = data['href'];
}
Elementary editing the JavaScript redirect you can re-submit the form.
and test when clicking if the variable is still true, just do nothing. Otherwise send Ajax.
If I understand you correctly, because without seeing the code - I can not understand.
Otherwise. check the article on dubbing - this is the backend - not my path ) - antonetta.Collins commented on July 8th 19 at 12:29