Re: sending a contact-form to different mail-addresses

Christian Stocker <[email protected]>
Newsgroups gmane.comp.cms.bitflux.general
Organization Bitflux GmbH
Message-ID <[email protected]>

On 23.10.2005 21:40 Uhr, Adrian Nussbaum wrote:
> servus
> 
>> extend inc/bx/filters/patforms/form2mail.php with your own class (or
>> bx_filters_patforms_formhandler) . It only needs one function
>> "submitFields".
> 
> 
> the next time i'll contact you in german again ;-) maybe i would 
> understand a little more than now ;-))
> how do i have to extend the form2mail.php? i do not really understand 
> it :-( how can i check, which topic/address the user has chosen?


Did you look at the code of bx_filters_patforms_form2mail? It's not
rocket science there :)

Joking aside, here's how to do it:

Write your own class, call it for example bx_filters_patforms_xpure
and put it in inc/bx/filters/patforms/xpure.php. Start your code with:

class  bx_filters_patforms_xpure extends bx_filters_patforms_formhandler {
    public function submitFields($params, $fields) {
    }
}

then change index.en.xhtml in your contact collection. Search for
<forms:class name="bx_filters_patforms_form2mail"> and change that to
   <forms:class name="bx_filters_patforms_xpure">

Now put a var_dump($params) and a var_dump($fields) in the function
"submitFields" above. Call the form, submit something, look at the
output and the rest should be doable with that output.

You can of course copy&paste most of the code from
"bx_filters_patforms_form2mail", but the "which email to send the form
to" part has to be coded by you, in php. flux cms doesn't provide
anything currently for that.

Hope that helps, just ask, if you have more questions. But don't expect
any more answers by me today, as I'm soon offline

chregu




> 
> maybe you've got the neves to help me ;-) ... thanx
> 
> adrian
> 
> 
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>   xpure - creative services - www.xpure.ch
>   adrian nussbaum | neumattstrasse 107 | ch-3422 ruedtligen
>   mobile: + 41 764 283 913   |    private: + 41 344 456 061
>   [email protected] | http://www.xpure.ch |  www.blogomanie.info
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

-- 
christian stocker | Bitflux GmbH | schoeneggstrasse 5 | ch-8004 zurich
phone +41 1 240 56 70 | mobile +41 76 561 88 60  | fax +41 1 240 56 71
http://www.bitflux.ch | [email protected] |  GPG 0x5CE1DECB
-- 
bitflux-cms mailing list
[email protected]
http://lists.bitflux.ch/cgi-bin/listinfo/bitflux-cms
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.