[pmwiki-users] Fox Contacts Search

Hans design5 at softflow.co.uk
Thu Apr 1 03:46:52 CDT 2010

Wednesday, March 31, 2010, 8:13:34 PM, Hans wrote:

> PmWiki's form markup substitutes $: for ptv_
> and the processing pagelist function does not understand that as a
> request to search for a PTV.

> That severely limits custom search forms.

So, thinking about this a bit more, I take back my words about the use
of Fox for search forms.  It is possibly to make a search form with
Fox in conjunction with Powertools, using the {(pagelist ) markup
expresion from Powertools. Then we can search for specific PTV values.

(:fox form foxaction=display:)
(:foxtemplate "{$$(pagelist group=Main $:name1={$$name1} $:name2={$$name2} fmt=#title)}":)
First name (:input text name1 -:)
Surname (:input text name2 -:)
(:input submit post 'Search' :)
(:foxend form:)

The input from various text fields is used as PTV values to serch for.
The results are displayed via foxaction=display (not posted to a
target) and (:foxdisplay:) and the foxtemplate, which is rendered as a
formatted page list.

One problem is that an empty field will not mean "any PTV value", but
none. So it needs a value of "-" . This is a little ugly to look at.
Maybe there are ways to avoid this.

By using  a Fox form we can take advantage of full variable
replacements in the fields and the template.


More information about the pmwiki-users mailing list