[pmwiki-users] Why do I see "$PostVars"?

Patrick R. Michaud pmichaud at pobox.com
Thu May 17 00:22:25 CDT 2007


On Wed, May 16, 2007 at 02:04:20PM -0700, Tony C. wrote:
> In the pmwiki.org Wiki Sandbox I entered the following:
> 
> (:if enabled InvalidLogin:)
> ERROR: Name/password not recognized
> (:if:)
> (:input auth_form:)
> || border=0 cellpadding=5
> || Name:||(:input text name=authid:) ||
> || Password:||(:input password name=authpw:) ||
> (:input submit value='OK':)
> (:input end:)
> 
> 
> What I see when I save that is (compensating for not being able to
> display HTML input elements):
> 
> $PostVars
>     Name: [             ]
> Password: [             ]
> 
> [OK]
> 
> 
> Why is "$PostVars" displayed there? Is there an easy way to make it not
> be displayed?

Normally when the authorization form is generated, it's in response
to a request that may have some other information in it (e.g.,
saving a page).  $PostVars is PmWiki's internal variable that
holds that additional information.  It's usually set by the
authorization form code, but here you're generating the form
without a specific request for authorization.

You can make the $PostVars disappear in your form by setting
the following in local/config.php:

    $FmtV['$PostVars'] = '';

Also, perhaps an easier method to duplicate the Site.AuthForm (rather
than copying the markup) would be to include it directly, as in:

    (:include Site.AuthForm:)

Hope this helps!

Pm



More information about the pmwiki-users mailing list