I found in archive of year 2003 the same question I ask for now:
http://forum.phpwcms.org/viewtopic.php? ... ect#p43201
How can I set the subject of contact form / subject of mail depending on where the visitor was before? - Perhaps now in 2008 a solution available?
I call the contact form by using "content part" and call content-ID 63. Is it perhaps possible to call a content part with a parameter? Or with some text?
thx
Eckard
FormTitle as default Subject in contact form and mail?
- Oliver Georgi
- Site Admin
- Posts: 9918
- Joined: Fri 3. Oct 2003, 22:22
- Contact:
Re: FormTitle as default Subject in contact form and mail?
Yes it is possible. Form can get custom field which sets subject. If you set this as hidden you can also define a default value which can be an internal value or what ever you like using frontend_render.
Oliver
Oliver
Re: FormTitle as default Subject in contact form and mail?
sorry, don't understand anything. I've searched frontend_render in this forum archive and I indeed find something, but I don't understand. Can you give me some pointers that I know which direction to search and to work?
German:
Ich verstehe leider NICHTS. Habe mal nach frontend_render gesucht und finde das was, was ich auch nicht weiter verstehe. Hast Du mir vielleicht ein paar Stichworte in welche Richtung ich mich einlesen soll bzw wonach ich hier im Forum-Archiv suchen soll?
Eckard
German:
Ich verstehe leider NICHTS. Habe mal nach frontend_render gesucht und finde das was, was ich auch nicht weiter verstehe. Hast Du mir vielleicht ein paar Stichworte in welche Richtung ich mich einlesen soll bzw wonach ich hier im Forum-Archiv suchen soll?
Eckard
Last edited by egerlach on Tue 9. Sep 2008, 00:17, edited 1 time in total.
- Oliver Georgi
- Site Admin
- Posts: 9918
- Joined: Fri 3. Oct 2003, 22:22
- Contact:
Re: FormTitle as default Subject in contact form and mail?
Here are some hints:
Then create a new script in template/inc_script/frontend_render - maybe name it mycustomsubject.php:
The string 'Whatever The Custom Subject Is' can be whatever you need - also the result of another function.
Oliver
Then create a new script in template/inc_script/frontend_render - maybe name it mycustomsubject.php:
Code: Select all
<php
$content['all'] = str_replace('{CUSTOM_SUBJECT}', 'Whatever The Custom Subject Is', $content['all']);
?>
Oliver