Mailform: setting the subject from URL parameter

Discussions and requests related to new CMSimple features, plugins, templates etc. and how to develop.
Please don't ask for support at this forums!
Post Reply
cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Mailform: setting the subject from URL parameter

Post by cmb » Thu Jun 26, 2014 10:53 pm

Hello Community,

what about allowing to preset the subject of the mailform from an URL parameter (if available)? This way the admin could link to the mailform for different specific purposes, and the user must not care to clarify those details that might seem clear for him/her. I mean something like this:

Code: Select all

<a href="?mailform&xh_mailform_subject=Registration>Ask for registration</a>
<a href="?mailform&xh_mailform_subject=Application%20for%20class%202014-06-27>apply for the class on June, 27th, 2014</a>
I'm not sure if that would be overkill for the built-in mailform, though.

What do you think?

Christoph
Christoph M. Becker – Plugins for CMSimple_XH

manu
Posts: 1090
Joined: Wed Jun 04, 2008 12:05 pm
Location: St. Gallen - Schweiz
Contact:

Re: Mailform: setting the subject from URL parameter

Post by manu » Fri Jun 27, 2014 6:57 am

You mean to preset the value of the form subject input field by a URL parameter, brilliant idea.

Holger
Site Admin
Posts: 3470
Joined: Mon May 19, 2008 7:10 pm
Location: Hessen, Germany

Re: Mailform: setting the subject from URL parameter

Post by Holger » Fri Jun 27, 2014 7:23 am

manu wrote:You mean to preset the value of the form subject input field by a URL parameter, brilliant idea.
Yes, I like it too :!:

cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Re: Mailform: setting the subject from URL parameter

Post by cmb » Wed Dec 10, 2014 4:22 pm

cmb wrote:I'm not sure if that would be overkill for the built-in mailform, though.
On further consideration I think it is okay to do it for the built-in mailform. In the long run we might consider to turn the built-in mailform to a standard plugin.
Christoph M. Becker – Plugins for CMSimple_XH

manu
Posts: 1090
Joined: Wed Jun 04, 2008 12:05 pm
Location: St. Gallen - Schweiz
Contact:

Re: Mailform: setting the subject from URL parameter

Post by manu » Mon Jan 05, 2015 11:12 am

Does anybody know, if this (in cms.php,line 834f ) is still actual?

Code: Select all

$pth['file']['search'] = $pth['folder']['cmsimple'] . 'search.php';
$pth['file']['mailform'] = $pth['folder']['cmsimple'] . 'mailform.php'; 
Neither seach.php nor mailform.php is present (there is a comment in classes/Controller.php line 49ff and a note in cmsimplewiki).

cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Re: Mailform: setting the subject from URL parameter

Post by cmb » Mon Jan 05, 2015 11:17 pm

manu wrote:Does anybody know, if this (in cms.php,line 834f ) is still actual?
$pth['file']['search'] is included in the controller if it exists, because Advancedsearch brings a modified search.php. There may be other modified search.php around. :?

With regard to $pth['file']['mailform'] I'm not sure why it is still there. It is never included in the core, and actually I don't image that it is used by some other extension/customization. It may have simply been an oversight while refactoring out XH_Mailform. It might be best to keep it (at least) until XH 1.7, anyhow.
Christoph M. Becker – Plugins for CMSimple_XH

Post Reply