Hello, I am trying to build a custom communication form. The functionality I am trying to achieve is, inform the admin (of the site) with an email, with the content of the form (name, email, message). And save the customer’s mail address (from the form) to a newsletter’s list, that I have create.
The functionality that does not work is the “saving mail” part . The thing is, that I have no errors in logs.
Here are my front end logs, with a success message.
Here are my back end logs, with a success message, as well.
Here is my front end code:
HTML
CSS
JS
And here, is my back end code:
PHP
If i do
<form method="post" action="https://mylaundryroom.gr/wp-admin/admin-ajax.php?action=tnp&na=s">
mails saved successfully.. but i don’t have the rest functionality i want..
That’s why i use
<form method="post" action="https://mylaundryroom.gr/wp-admin/admin-ajax.php?action=custom_tnp">
Also, i use divi’s code module for front end code, and code snippet plugin for back end code.