[pmwiki-users] wikiforms - default email domain? (david)

john.rankin at affinity.co.nz john.rankin at affinity.co.nz
Fri Jun 27 20:59:44 CDT 2008

> Subject: [pmwiki-users] wikiforms - default email domain?
> i'm playing around with http://www.pmwiki.org/wiki/Cookbook/WikiForms and
> would like some help! please!!
> i have a FormTemplate that i call using (:wikiform:) on a form page.
> in the template i have an email field -> :Contact Details:contact
> (email=30 15)
> as this form would be for internal users only, how do i specify an email
> address domain to be automatically filled in (i.e hotmail.com)? i've tried
> adding it in the template but am not getting much luck!

Download the latest version (just uploaded) and change the definition to:

:Contct Details:contct (email"hotmail.com"=30 15)

> so when the form is called the first part of the form is blank and the
> example of hotmail.com is automatically filled in after the @ sign.
> also, if i needed to have a drop-down box to include a 2nd or 3rd domain
> would this be possible to configure it in the template?

It could be done, but is a bit trickier. With the current fix, the user can
just change hotmail.com if she or he wishes to change the default.
But if we provide a pick list, we have to provide a text field *as well*,
in case the domain is not one of those listed.

Applying "when in doubt, leave it out," let's start by allowing a default
value, which the user can over-write.


More information about the pmwiki-users mailing list