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';

> 2. Is it possible to setup mailform that would use fixed subject (e.g.
> "Site Feedback" or "Feedback from {$$PageUrl}")?

Yes -- again, just set the parameter in the configuration:

  $PmForm['mailform'] =
    '[EMAIL PROTECTED] [EMAIL PROTECTED] 
     subject="Site Feedback"
     form=#mailform fmt=#mailpost';

Any fields set in the configuration override values coming
from a post.
 
> And finally one problem:
> 
> When I enter multiline text with EOL characters, I always get error
> message "Message text required". Single line text is sent
> successfully.

Now fixed as of PmForm version 2007-06-12.

Pm

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

Reply via email to