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.01 00.01 config end
 2: 00.22 00.21 MarkupToHTML begin
 3: 00.22 00.21 MarkupToHTML begin
 4: 00.23 00.22 MarkupToHTML end
 5: 00.23 00.22 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.23 MarkupToHTML begin
14: 00.23 00.23 FPLTemplate: Chain begin
15: 00.23 00.23 FPLTemplate: FPLTemplateLoad
16: 00.23 00.23 FPLTemplate: FPLTemplateDefaults
17: 00.23 00.23 FPLTemplate: FPLTemplatePageList
18: 00.23 00.23 MakePageList pre
19: 00.23 00.23 PageListSources begin
20: 00.23 00.23 PageStore::ls begin wiki.d/{$FullName}
21: 00.24 00.23 PageStore::ls merge wiki.d/{$FullName}
22: 00.24 00.23 PageStore::ls end wiki.d/{$FullName}
23: 00.24 00.24 PageStore::ls begin $FarmD/wikilib.d/{$FullName}
24: 00.24 00.24 PageStore::ls merge $FarmD/wikilib.d/{$FullName}
25: 00.24 00.24 PageStore::ls end $FarmD/wikilib.d/{$FullName}
26: 00.25 00.24 PageListSources end count=1131
27: 00.25 00.24 PageListSort pre ret=4 order=name
28: 00.25 00.24 MakePageList items count=1131, filters=
29: 00.25 00.24 MakePageList post count=1131, readc=0
30: 00.25 00.24 PageListSort begin
31: 00.25 00.24 PageListSort sort
32: 00.26 00.25 PageListSort end
33: 00.26 00.25 MakePageList end
34: 00.26 00.25 FPLTemplate: FPLTemplatePmWikiOrg
35: 00.26 00.25 MarkupToHTML begin
36: 00.26 00.25 MarkupToHTML end
37: 00.26 00.25 FPLTemplate: FPLTemplateSliceList
38: 00.26 00.25 FPLTemplate: FPLTemplateFormat
39: 00.37 00.31 MarkupToHTML begin
40: 00.48 00.42 MarkupToHTML end
41: 00.48 00.42 FPLTemplate: FPLTemplatePmWikiOrgPostFormat
42: 00.48 00.42 FPLTemplate: Chain end
43: 00.48 00.42 MarkupToHTML end
44: 00.48 00.42 MarkupToHTML begin
45: 00.48 00.42 MarkupToHTML end
46: 00.49 00.43 MarkupToHTML end
47: 00.49 00.44 MarkupToHTML begin
48: 00.50 00.44 ReadApprovedUrls SiteAdmin.ApprovedUrls begin
49: 00.51 00.45 ReadApprovedUrls SiteAdmin.ApprovedUrls end
50: 00.51 00.45 MarkupToHTML end
51: 00.51 00.45 MarkupToHTML begin
52: 00.52 00.46 MarkupToHTML end
53: 00.52 00.46 now
Peak memory: 4,731,160 bytes