marazmarci
Forum Replies Created
-
Forum: Plugins
In reply to: [CF7 Spreadsheets] CF7 not giving successful message or thank you pageI think it’s more of a workaround than a fix ??
My only focus was to get rid of the warning message the server produces.I’ve added a ‘@’ to the 692th line:
if (!empty(@$request_data[$clear_tag]) || '0' ...
link to that line:
https://github.com/moshenskyDV/CF7-spreadsheets/blob/master/CF7-spreadsheets/CF7-spreadsheets.php#L692- This reply was modified 4 years, 5 months ago by marazmarci.
Forum: Plugins
In reply to: [CF7 Spreadsheets] CF7 not giving successful message or thank you pageIt turned out, the server sends this response to the client after form submission:
“<br />
<b>Notice</b>: Undefined index: _date in <b>*****/wp-content/plugins/cf7-spreadsheets/CF7-spreadsheets.php</b> on line <b>692</b><br />
<br />
<b>Notice</b>: Undefined index: _time in <b>*****/wp-content/plugins/cf7-spreadsheets/CF7-spreadsheets.php</b> on line <b>692</b><br />
{“into”:”#wpcf7-f11476-p11350-o1″,”status”:”mail_sent”,”message”:”Sikeresen elk\u00fcldted az imat\u00e9ma-h\u00e1laad\u00e1sodat”,”posted_data_hash”:”2616dc0cc4bf70dbcba192df7e63cf9c”}”Here’s the relevant client side code (see my comments):
$.ajax({
type: ‘POST’,
url: wpcf7.apiSettings.getRoute(‘/contact-forms/’ + wpcf7.getId($form) + ‘/feedback’),
data: formData,
dataType: ‘json’,
processData: !1,
contentType: !1
}).done(function(data, status, xhr) {
ajaxSuccess(data, status, xhr, $form);
$(‘.ajax-loader’, $form).removeClass(‘is-active’)
}).fail(function(xhr, status, error) {// this callback gets executed because of a parser error
// the client expects JSON, but the response starts with the char ‘<‘var $e = $(‘<div class=”ajax-error”></div>’).text(error.message);
$form.after($e)
})