This is an old revision of the document!


Automatic subject

FIXME translate

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

Wie man ein hiddenfield einbaut und nutzt kann man hier sehen…

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. Erstelle im Formular ein verstecktes Feld (hidden field) mit dem Namen 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 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 …

english/phpwcms-system/article/contentparts/form/special-applications/automatic-subject.1240639597.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