This is an old revision of the document!


Automatic subject

Post by markus_s
Forum:http://forum.phpwcms.org/viewtopic.php?p=92977#p92977

To use a hidden field please have a look …

ok - if you want the name of the artikel in the mail subject, to identify your contact forms you need a new .php file in your frontend render.

Mit diesem Tool wird aus einem Formular ein verstecktes Feld in den “subject” des eMails geschrieben…

Problemstellung: In mehreren “Artikeln” befindet sich ein Kontaktformular. (für Kursanmeldung)
Nun brauche ich, nachdem sich ein Kunde über das Kontaktforumlar angemeldet hat,
die Info zu diesem Kurs ohne dass dies der Kunde extra eintragen muss.
Und so gehts:

1. Make in your contact form a hidden field with name mailsubject.

type in the field "Value":

[%GLOBAL_FORM_SUBJECT%]

and save this.


2. Choose in the top ob the form under “subject” the “Form: mailsubject”


3. Make a file at your editor with the following content:

<?php
$content['all'] = str_replace('[%GLOBAL_FORM_SUBJECT%]', trim('your own text: ' . html_specialchars($content['article_title'])), $content['all']);
?>

Save the file with the name “email_subject.php” under template/inc_script/frontend_render or simply download the finished file HERE (email_subject.zip (364 B, 164 downloads))


4. Now the article title is seen in the subject from your email - now, you can ident the different contact forms …

Have a look too: Send a friend

english/phpwcms-system/article/contentparts/form/special-applications/automatic-subject.1242179378.txt.gz · Last modified: 2018/06/03 18:07 (external edit)
www.planmatrix.de www.chimeric.de Creative Commons License Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0