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]]
 0: 00.00 00.00 config start
 1: 00.02 00.01 config end
 2: 00.22 00.20 MarkupToHTML begin
 3: 00.22 00.20 MarkupToHTML begin
 4: 00.23 00.21 MarkupToHTML end
 5: 00.23 00.21 MarkupToHTML begin
 6: 00.23 00.22 MarkupToHTML end
 7: 00.23 00.22 MarkupToHTML begin
 8: 00.23 00.22 MarkupToHTML end
 9: 00.23 00.22 MarkupToHTML begin
10: 00.23 00.22 MarkupToHTML end
11: 00.23 00.22 MarkupToHTML begin
12: 00.23 00.22 MarkupToHTML end
13: 00.23 00.22 MarkupToHTML begin
14: 00.23 00.22 FPLTemplate: Chain begin
15: 00.23 00.22 FPLTemplate: FPLTemplateLoad
16: 00.24 00.22 FPLTemplate: FPLTemplateDefaults
17: 00.24 00.22 FPLTemplate: FPLTemplatePageList
18: 00.24 00.22 MakePageList pre
19: 00.24 00.22 PageListSources begin
20: 00.24 00.22 PageStore::ls begin wiki.d/{$FullName}
21: 00.24 00.23 PageStore::ls merge wiki.d/{$FullName}
22: 00.25 00.23 PageStore::ls end wiki.d/{$FullName}
23: 00.25 00.23 PageStore::ls begin $FarmD/wikilib.d/{$FullName}
24: 00.25 00.23 PageStore::ls merge $FarmD/wikilib.d/{$FullName}
25: 00.25 00.23 PageStore::ls end $FarmD/wikilib.d/{$FullName}
26: 00.25 00.23 PageListSources end count=1134
27: 00.25 00.23 PageListSort pre ret=4 order=name
28: 00.25 00.23 MakePageList items count=1134, filters=
29: 00.25 00.23 MakePageList post count=1134, readc=0
30: 00.25 00.23 PageListSort begin
31: 00.25 00.23 PageListSort sort
32: 00.26 00.24 PageListSort end
33: 00.26 00.24 MakePageList end
34: 00.26 00.24 FPLTemplate: FPLTemplatePmWikiOrg
35: 00.26 00.24 MarkupToHTML begin
36: 00.26 00.24 MarkupToHTML end
37: 00.26 00.24 FPLTemplate: FPLTemplateSliceList
38: 00.26 00.24 FPLTemplate: FPLTemplateFormat
39: 00.33 00.32 MarkupToHTML begin
40: 00.43 00.42 MarkupToHTML end
41: 00.43 00.42 FPLTemplate: FPLTemplatePmWikiOrgPostFormat
42: 00.43 00.42 FPLTemplate: Chain end
43: 00.43 00.42 MarkupToHTML end
44: 00.43 00.42 MarkupToHTML begin
45: 00.44 00.42 MarkupToHTML end
46: 00.44 00.43 MarkupToHTML end
47: 00.45 00.43 MarkupToHTML begin
48: 00.46 00.44 ReadApprovedUrls SiteAdmin.ApprovedUrls begin
49: 00.46 00.44 ReadApprovedUrls SiteAdmin.ApprovedUrls end
50: 00.47 00.45 MarkupToHTML end
51: 00.47 00.45 MarkupToHTML begin
52: 00.47 00.45 MarkupToHTML end
53: 00.47 00.45 now
Peak memory: 4,740,512 bytes