Two mailforms?

General questions about CMSimple
bca
Posts: 293
Joined: Tue Sep 15, 2009 4:49 pm

Two mailforms?

Post by bca » Wed Sep 22, 2010 9:08 am

Hi

Is it possible to have a mailform link on each page BUT have the email go to a different email account for each page?

My head says its probably not possible without recoding but its worth asking the question ;)

b

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

Re: Two mailforms?

Post by Holger » Wed Sep 22, 2010 9:23 am

Hi b,

should be possible with this plugin:
http://cmsimpleplugins.jakobsfeld.dk/?F ... r_%28XH%29

Holger

bca
Posts: 293
Joined: Tue Sep 15, 2009 4:49 pm

Re: Two mailforms?

Post by bca » Wed Sep 22, 2010 4:15 pm

Thanks Holger

I'll have a look

b

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

Re: Two mailforms?

Post by Holger » Wed Sep 22, 2010 4:39 pm

Hi B,

I think there's an easier way:

when you use my pd_scripting plugin, you can change the config-setting for the mailadress on each page.
This way you may use the original mailform.
I've not tested - but I think it should work.

Holger

bca
Posts: 293
Joined: Tue Sep 15, 2009 4:49 pm

Re: Two mailforms?

Post by bca » Wed Sep 22, 2010 9:18 pm

Hi Holger

That seems like a better idea. The formmailer-xh is a bit complicated to understand!

I have had a play with $tx['mailform']['email']="myemail.com"; in pd-scripting
but cant get it to work.
If i dont put an address in the cms/config i dont get the mailform page appear.
If i put an email in the config file i only get the email to that address.

Have I got the syntax correct?

B

bca
Posts: 293
Joined: Tue Sep 15, 2009 4:49 pm

Re: Two mailforms?

Post by bca » Mon Oct 04, 2010 9:23 am

Have you a hint on how to get this to work Holger?

b

Tata
Posts: 3587
Joined: Tue May 20, 2008 5:34 am
Location: Slovakia
Contact:

Re: Two mailforms?

Post by Tata » Mon Oct 04, 2010 9:49 am

Not tested (time lack), but should probably work, try it:
1. Leave $cf['mailform']['email'] in config.php empty.
2. Use on desired pages hi_pg_scripting with

Code: Select all

$cf['mailform']['email']="some@email.com";
and

Code: Select all

mailform();

(you nustu allow more scripts on one page in hi_pd_scripting-config)
CMSimple.sk
It's no shame to ask for an answer if all efforts failed.
But it's awful to ask without any effort to find the answer yourself.

bca
Posts: 293
Joined: Tue Sep 15, 2009 4:49 pm

Re: Two mailforms?

Post by bca » Mon Oct 04, 2010 3:44 pm

Thanks Tata but sorry but that doesnt work.
Tata wrote: 1. Leave $cf['mailform']['email'] in config.php empty.
2. Use on desired pages hi_pg_scripting with

Code: Select all

$cf['mailform']['email']="some@email.com";
and

Code: Select all

mailform();

(you nustu allow more scripts on one page in hi_pd_scripting-config)
All I get is a blank page on pages where that code is in Holgers plugin

b

Tata
Posts: 3587
Joined: Tue May 20, 2008 5:34 am
Location: Slovakia
Contact:

Re: Two mailforms?

Post by Tata » Mon Oct 04, 2010 5:47 pm

Try this on a page:

Code: Select all

<h2>e-mail form</h2>
<p>#CMSimple include $pth['file']['mailform']; $o = $output . $o; $output = '';#</p>
and the mail definition in hi_pd_scripting.

Code: Select all

$cf['mailform']['email']="some@email.com";
CMSimple.sk
It's no shame to ask for an answer if all efforts failed.
But it's awful to ask without any effort to find the answer yourself.

bca
Posts: 293
Joined: Tue Sep 15, 2009 4:49 pm

Re: Two mailforms?

Post by bca » Mon Oct 04, 2010 9:58 pm

Tata wrote:Try this on a page:

Code: Select all

<h2>e-mail form</h2>
<p>#CMSimple include $pth['file']['mailform']; $o = $output . $o; $output = '';#</p>
and the mail definition in hi_pd_scripting.

Code: Select all

$cf['mailform']['email']="some@email.com";
Thanks Tata just spent a couple of hours on that but it doesnt work either!

As soon as I remove the email address in config the email form wont appear.
:?

B

Post Reply