On 6/13/07, Patrick R. Michaud <[EMAIL PROTECTED]> 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. [EMAIL PROTECTED]) would be used instead.
>
> Perhaps pre-load the "From:" field with an address?
>
>     (:input text name=from value='[EMAIL PROTECTED]' :)
>
> 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'] =
>     '[EMAIL PROTECTED] [EMAIL PROTECTED]
>      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

_______________________________________________
pmwiki-users mailing list
[email protected]
http://www.pmichaud.com/mailman/listinfo/pmwiki-users

Reply via email to