contact form problem
eCommerce WordPress theme to create online shop with WooCommerce support
- GK User
- Thu Oct 13, 2016 10:59 am
contact form does not work after you click send to return a blank page
http://mtd-przyczepy.pl/kontakt/
http://mtd-przyczepy.pl/kontakt/
-
- Senior Boarder
- GK User
- Thu Oct 13, 2016 1:05 pm
I noticed that the problem lies in php 7, I would still use PHP 7
-
- Senior Boarder
- Joshua M
- Thu Oct 13, 2016 8:06 pm
Hello,
Did you notice any error/warning message?
Did you notice any error/warning message?
-
- Moderator
- GK User
- Fri Oct 14, 2016 3:26 pm
Please check the link, there is no error, a blank page. After the change of php 7.0 to 5.6 everything works ok. But this is not a solution because I would like to stay on php 7.0
-
- Senior Boarder
- GK User
- Sun Oct 16, 2016 10:34 pm
I have the same problem. Quark template and php 7.0. Do you have any solution for this?
-
- Junior Boarder
- Joshua M
- Mon Oct 17, 2016 9:27 am
Hi,
Try to edit template.contact.php file and change the following fragment:
into:
Try to edit template.contact.php file and change the following fragment:
- Code: Select all
// check the e-mail
if($params_email) {
if(trim($_POST['email']) === '' || !eregi("^[A-Z0-9._%-]+@[A-Z0-9._%-]+\.[A-Z]{2,4}$", trim($_POST['email']))) {
$validated = false;
$errors['email'] = __('please enter correct email address.', GKTPLNAME);
} else {
$output['email'] = trim($_POST['email']);
}
}
into:
- Code: Select all
// check the e-mail
if($params_email) {
$regex = '/([a-z0-9_]+|[a-z0-9_]+\.[a-z0-9_]+)@(([a-z0-9]|[a-z0-9]+\.[a-z0-9]+)+\.([a-z]{2,4}))/i';
if(trim($_POST['email']) === '' || !preg_match($regex, trim($_POST['email']))) {
$validated = false;
$errors['email'] = __('please enter correct email address.', GKTPLNAME);
} else {
$output['email'] = trim($_POST['email']);
}
}
-
- Moderator
- GK User
- Mon Oct 17, 2016 12:01 pm
ok everything works ok, thank you. I would like to ask where where edit the template email sent from a form, and how to add more recipients Message
-
- Senior Boarder
- Joshua M
- Tue Oct 18, 2016 8:37 am
Hello, I don't understand - the mail is sent from mail (name) typed in the contact form. (destination mail address may be changed from Template options -> Pages tab -> "Contact e-mail" option.
-
- Moderator
- GK User
- Tue Oct 18, 2016 8:54 am
yes I know, but as more addresses, [email protected], [email protected]
-
- Senior Boarder
- Joshua M
- Wed Oct 19, 2016 8:37 am
The following fragment is responsible for email address:
Try to add this code underneath:
- Code: Select all
$email = get_option($gk_tpl->name . '_contact_template_email', '');
// if the user specified blank e-mail or not specified it
if(trim($email) == '') {
$email = get_option('admin_email');
}
Try to add this code underneath:
- Code: Select all
$email = '[email protected], [email protected]';
-
- Moderator
10 posts
• Page 1 of 1