Skip to content

Commit ddd6b3f

Browse files
author
CleanTalk
committed
Merge pull request #2 from safronik/master
Fast Security Contact Forms with custom field names
2 parents f16292c + 7dfa400 commit ddd6b3f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

inc/cleantalk-public.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1512,7 +1512,10 @@ function ct_si_contact_form_validate($form_errors = array(), $form_id_num = 0) {
15121512
$sender_email = null;
15131513
$sender_nickname = null;
15141514
$subject = '';
1515-
$message = '';
1515+
$message = array();
1516+
//getting info from custom fields
1517+
@ct_get_fields_any($sender_email, $message, $sender_nickname, $subject, $contact_form, $_POST);
1518+
//setting fields if they with defaults names
15161519
if (isset($_POST['email']))
15171520
$sender_email = $_POST['email'];
15181521

0 commit comments

Comments
 (0)