[pmwiki-users] ptv and forms
Petko Yotov
5ko at 5ko.fr
Tue Feb 9 02:49:59 CST 2016
Currently PmWiki searches and pagelists don't allow the setting of a
$:PageTextVariable in a separate form field: it only accepts them if
written in the (:pagelist $:PTV=2:) markup, or as a part of the "q"
request parameter.
I've made a change that should allow you to use $:PTVs in individual
form fields. For example, you can search for $:Audience=*author* in
PmWiki/:
http://www.pmwiki.org/wiki/PmWiki/PmWiki?action=search&q=PmWiki%2F&ptv_Audience=*author*
Please test the latest scripts/pagelist.php from Subversion and report
if it works for you.
http://www.pmwiki.org/wiki/PmWiki/Subversion
Using PageVariables like $Name as a form field name is still not
supported (and will probably not be).
Petko
P.S. When you write:
(:input form "http://labo.nonmarchand.org/pmwiki/" method:)
instead of "method" you should use "POST" or "GET" (or nothing).
---
Change log : http://www.pmwiki.org/wiki/PmWiki/ChangeLog
Release notes : http://www.pmwiki.org/wiki/PmWiki/ReleaseNotes
If you upgrade : http://www.pmwiki.org/wiki/PmWiki/Upgrades
On 2016-02-07 21:03, Benjamin Grassineau wrote:
> Hello,
>
> A problem !
>
> I use a form in order to create a research page. It works, but I can't
> get
> the value of page text variables.
>
> Example of form :
>
> (:input form "http://labo.nonmarchand.org/pmwiki/" method:)
> (:input hidden n 'Accueil.Recherche':)
> (:input hidden group 'Blog':)
> (:input hidden action search:)
> (:input hidden $:RubriqueArticle '2':)
> (:input hidden req 0:)
> (:input submit value="Results":)
> (:input end:)
>
> The result in the adress bar is :
>
> http://labo.nonmarchand.org/pmwiki/?n=Accueil.Recherche&group=Blog&action=search&
> *ptv_RubriqueArticle*=2&req=0
>
> And it doesn't work. The value of *ptv_*RubriqueArticle is omitted.
>
> But it works if I manually change the writing of ptv
> (*$:*RubriqueArticle)
> in the adress bar as follow :
>
> http://labo.nonmarchand.org/pmwiki/?n=Accueil.Recherche&group=Blog&action=search&
> *$:RubriqueArticle*=2&req=0
>
> So my question is how can I get the value of ptv in a search form ?
>
> Thanks if you have any solution.
>
> Benjamin
>
> _______________________________________________
> pmwiki-users mailing list
> pmwiki-users at pmichaud.com
> http://www.pmichaud.com/mailman/listinfo/pmwiki-users
More information about the pmwiki-users
mailing list