Hello. I am running a second line of tests trying to fix this problem. Based on previous support responses to other customers (with similar problems), where you suggest to update the phpmailer and some functions, I have created a copy of the main html and copies of the php and js libraries, and I have followed a few steps which I will detail below:
- The copy html file for this second test is in the following path www.perutoursinfo.com/index-test.html
- This file was modified and now the form is processed using include/form.php (from version 6.6.5) I tried to use my original form code (sample contact-5.html from version 5.4) with only some minor changes. I basically added .customjs .form-widget .form-result (it looks like JS files search for those in the code but I'm not sure if they should be used in this way or if I should remove the other classes) and change the reference to functions.js to functions2.js (more info in number 5)
``
Contáctenos llenando el siguiente formulario:
×
Nombre / Apellidos *
Email *
Teléfono *
Destino de viaje
Fecha de viaje
# de Adultos
-- Seleccione --
1
2
3
4
5
Más de 5
# de Niños
-- Seleccione --
0
1
2
3
4
5
Más de 5
Asunto *
Mensaje *
Enviar Mensaje
Cerrar
I basically
3. form.php file was modified in the receiver's email and sender's email part also I modified this part of code
require 'phpmailer/src2/Exception.php';
require 'phpmailer/src2/PHPMailer.php';
require 'phpmailer/src2/SMTP.php';
- From version 6.6.5 I have obtained the phpmailer/src folder and copied it as phpmailer/src2 (File: Exception.php, OAuth.php
OAuthTokenProvider.php, PHPMailer.php, POP3.php, SMTP.php)
- I created a copy of function.js file (from version 5.4) renamed it as functions2.js and replaced some parts taken from version 6.6.5
5a) I included SEMICOLON.widget.ajaxForm() in init: funcion() part
5b) I addded ajaxForm: funtion() in functions2.js
ajaxForm: function( element ){
let formSettings = {
element: element,
default: '.form-widget',
file: 'plugins.form.js',
error: 'plugins.form.js: Plugin could not be loaded',
execfn: false,
pluginfn: () => $().validate && $().ajaxSubmit,
class: 'has-plugin-form'
};
let settings = {
element: element,
default: '.form-widget',
file: 'plugins.ajaxform.js',
error: 'plugins.ajaxform.js: Plugin could not be loaded',
execfn: 'SEMICOLON_ajaxFormInit',
pluginfn: () => typeof scwAjaxFormPlugin !== "undefined",
trigger: 'pluginAjaxFormReady',
class: 'has-plugin-ajaxform'
};
SEMICOLON.initialize.functions( formSettings );
SEMICOLON.initialize.functions( settings );
},
- I copied files: plugins.ajaxform.js and plugins.form.js from version 6.6.5 to JS folder
with all these changes the form seems to work (I receive emails with the test data I used) but the message of successful submission or error is no longer displayed in the same page as before (in the top right corner there was a message with green or red background and white letters depending on the result of the submission) but it is displayed in a new tab in the form.php path (look at the attached screenshot)
Please let me know if I'm missing something in the code, or any suggestions to improve it and fix it.
Thanks in advance.
Regards.