Recent Changes - Search:

PmWiki

pmwiki.org

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

InputSelect

This page is testing the new (:input select ... :) markup in forms, as well as testing the ability to retain values across form submissions.

We'll start with (:input select ...:). The basic form of a select box is a sequence of options:


(:input form:)
(:input select name=abc value=1:)
(:input select name=abc value=2:)
(:input select name=abc value=3:)
(:input submit:)
(:input end:)

To have options with labels different from the value of the control, use the label=option:

(:input form:)
(:input select name=abc value=1 label=alpha :)
(:input select name=abc value=2 label=beta  :)
(:input select name=abc value=3 label=gamma :)
(:input submit:)
(:input end:)

Or, the values can be specified positionally:

(:input select name=abc 1 alpha :)
(:input select name=abc 2 beta  :)
(:input select name=abc 3 gamma :)

We can specify the size of the selection box:

(:input select name=abc 1 alpha size=3 :)
(:input select name=abc 2 beta  :)
(:input select name=abc 3 gamma :)

The "multiple" option works:

(:input select name=abc 1 alpha size=3 multiple:)
(:input select name=abc 2 beta  :)
(:input select name=abc 3 gamma :)

So, here's a dropdown list of pages in the Test group:

(:if false:)
[[#dropdownlist]]
(:input select name=n {=$FullName} "{=$Name}":)
[[#dropdownlistend]]
(:if:)

(:pagelist fmt=#dropdownlist group=Test:)

A group page navigator:

>>display=none<<[@
[[#navigator]]
(:if equal {=$FullName} {*$FullName}:)
(:input select name=n  selected=selected {=$FullName} "{=$Name}":)
(:if ! equal {=$FullName} {*$FullName}:)
(:input select name=n {=$FullName} "{=$Name}":)
[[#navigatorend]]
@](:nl:)>><<

(:comment pagelist fmt=#navigator group=Test:)
[[#navigator]]
(:if equal {=$FullName} {*$FullName}:)
(:input select name=n  selected=selected {=$FullName} "{=$Name}":)
(:if ! equal {=$FullName} {*$FullName}:)
(:input select name=n {=$FullName} "{=$Name}":)
[[#navigatorend]]
Edit - History - Print - Recent Changes - Search
Page last modified on December 12, 2006, at 01:39 AM
 0: 00.00 00.00 config start
 1: 00.00 00.00 config end
 2: 00.07 00.07 MarkupToHTML begin
 3: 00.08 00.07 MarkupToHTML begin
 4: 00.10 00.09 MarkupToHTML end
 5: 00.10 00.09 MarkupToHTML begin
 6: 00.11 00.10 MarkupToHTML end
 7: 00.11 00.10 MarkupToHTML begin
 8: 00.11 00.11 MarkupToHTML end
 9: 00.11 00.11 MarkupToHTML begin
10: 00.12 00.11 MarkupToHTML end
11: 00.12 00.11 MarkupToHTML begin
12: 00.12 00.12 MarkupToHTML end
13: 00.12 00.12 MarkupToHTML begin
14: 00.13 00.12 FPLTemplate begin
15: 00.13 00.12 MakePageList pre
16: 00.13 00.12 PageListSources begin
17: 00.13 00.12 PageStore::ls begin wiki.d/{$FullName}
18: 00.23 00.15 PageStore::ls merge wiki.d/{$FullName}
19: 00.26 00.18 PageStore::ls end wiki.d/{$FullName}
20: 00.26 00.19 PageStore::ls begin $FarmD/wikilib.d/{$FullName}
21: 00.27 00.19 PageStore::ls merge $FarmD/wikilib.d/{$FullName}
22: 00.27 00.19 PageStore::ls end $FarmD/wikilib.d/{$FullName}
23: 00.27 00.19 PageListSources end count=845
24: 00.27 00.19 PageListSort pre ret=4 order=name
25: 00.27 00.19 MakePageList items count=845, filters=
26: 00.28 00.20 MakePageList post count=845, readc=0
27: 00.28 00.20 PageListCache begin save key=0aec0f8a63f5e289a1085534c104cd1b
28: 00.29 00.20 PageListCache end save
29: 00.29 00.20 PageListSort begin
30: 00.29 00.20 PageListSort sort
31: 00.34 00.25 PageListSort end
32: 00.34 00.25 MakePageList end
33: 00.50 00.41 MarkupToHTML begin
34: 01.17 01.07 MarkupToHTML end
35: 01.17 01.07 FPLTemplate end
36: 01.17 01.08 MarkupToHTML end
37: 01.17 01.08 MarkupToHTML begin
38: 01.18 01.08 MarkupToHTML end
39: 01.20 01.10 MarkupToHTML end
40: 01.22 01.12 MarkupToHTML begin
41: 01.25 01.15 ReadApprovedUrls SiteAdmin.ApprovedUrls begin
42: 01.25 01.16 ReadApprovedUrls SiteAdmin.ApprovedUrls end
43: 01.27 01.18 MarkupToHTML end
44: 01.27 01.18 MarkupToHTML begin
45: 01.29 01.19 MarkupToHTML end
46: 01.48 01.20 now