Data transfer to a form

An example for using a automatic subject in form.

Posted by markus_s

Using this tools you can write a hidden form field into the “subject” of the e-mail …

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.

The problem:
In several “articles” I uses a form for contact. (Course registration) I need the info to this course without a specially registration, after a customer has registered himself by the contact form to this course.

Let´s go:
1. Make in your contact form a hidden field with the name mailsubject.

Type in the field “Value”:


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:

$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 ( (364 B, 110 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.txt · Last modified: 2018/06/03 18:09 (external edit) 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