Ambiera ForumDiscussions, Help and Support. |
|
|
|||||
|
In order to better identify spam, I would like to supplement the standard text "Contact form request" with the content of the name field. How does that work? I can't find an attribute field. |
||||
|
You can just add any form field to the contact form, and set it's name to whatever you like - this will then turn up in the email you get. |
||||
|
I know this, but I don't want to open the mail for nothing.. If the mailing address is in the subject field, I can delete the mail immediately or have you a better idea?. |
||||
|
Ah, now I understand, the subject of the email you get should include the name field. Hm, with the component there is no way, but you can create an own contact form (just like in the contact form tutorial) and in the line mail("youremail@example.com", "Contact form request", $text); replace this part: "Contact form request" with "Contact form request" . $_POST['name'] which only works if your field is named "name". |
||||
|
Who can help? - Where is the mistake? The worth of the name field is not in the mail subject - Thanks foreach($_POST as $name => $value) { $text .= "$name : $value\n"; } if ($text != "") { ... mail("*****@online.de", "Anfrage von Homepage - " . $_POST['name'], $text); }[ |
||||
|
How did you name the name field? If it's for example "Name" or "Vorname", then you need to set it where the code says 'name', so for example then 'Vorname' or 'Name' - then it will work. |
||||
|
Thanks - now it works I didn't change the name of the standard field, the right name is "NameField" and not name |
|