[pmwiki-users] PmForm (Mailform) questions

Roman romat2 at gmail.com
Wed Jun 13 08:04:13 CDT 2007


On 6/13/07, Patrick R. Michaud <pmichaud at pobox.com> wrote:
> On Tue, Jun 12, 2007 at 04:49:20PM +0200, Roman wrote:
> > I've created my first mailform and I would like to ask if the
> > following is possible.
> >
> > 1. Is it possible to setup mailform where e-mail address would be
> > optional? If user does not enter e-mail address then some fixed "from"
> > adrress (e.g. pmwiki at server.com) would be used instead.
>
> Perhaps pre-load the "From:" field with an address?
>
>     (:input text name=from value='pmwiki at server.com' :)
>
> I probably need to come up with a "use this value if field empty"
> option, or make it the default.
>
> > Or, if it is
> > easier, e-mail would be always sent from fixed address, and optional
> > user e-mail would be part of e-mail text.
>
> Always sending from a fixed address can be done a variety of ways...
> the easiest is to set the 'from' field in the configuration:
>
>   $PmForm['mailform'] =
>     'mailto=someone at example.com from=pmwiki at server.com
>      form=#mailform fmt=#mailpost';

Ah, that was easy. Now I better understand how PmForm configuration
works. I prefer hidden "from" address so I chose second solution.

Two more comments:

1. When I hit Preview on a page with mailform, e-mail text (textarea)
is pre-loaded by page source text. You can reproduce it at
http://www.pmwiki.org/pmform/PmForm/MailForm. It's not a big problem
but it's confusing.

2. (:messages:) directive is part of mailform template. When someting
goes wrong one could easily overlook error messages, especially on
long pages where mailform is at the bottom. So I deleted (:messages:)
from template and put it at the beginning of every page where mailform
is used. My question is: Can I put (:messages:) to AllGroupHeader? Can
it cause any problem on pages where (:messages:) have no use? Or,
could PmWiki show such messages at the top of page by default, i.e.
without the need to explictly use (:messages:) directive?

Thank you
Roman



More information about the pmwiki-users mailing list