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 September 10, 2011, at 12:03 PM
 0: 00.00 00.00 config start
 1: 00.00 00.00 config end
 2: 00.12 00.05 MarkupToHTML begin
 3: 00.12 00.05 MarkupToHTML begin
 4: 00.14 00.07 MarkupToHTML end
 5: 00.14 00.07 MarkupToHTML begin
 6: 00.14 00.08 MarkupToHTML end
 7: 00.14 00.08 MarkupToHTML begin
 8: 00.15 00.08 MarkupToHTML end
 9: 00.15 00.08 MarkupToHTML begin
10: 00.15 00.09 MarkupToHTML end
11: 00.15 00.09 MarkupToHTML begin
12: 00.16 00.09 MarkupToHTML end
13: 00.16 00.09 MarkupToHTML begin
14: 00.16 00.09 FPLTemplate: Chain begin
15: 00.16 00.09 FPLTemplate: FPLTemplateLoad
16: 00.16 00.09 FPLTemplate: FPLTemplateDefaults
17: 00.16 00.09 FPLTemplate: FPLTemplatePageList
18: 00.16 00.09 MakePageList pre
19: 00.16 00.09 PageListCache begin load key=0aec0f8a63f5e289a1085534c104cd1b
20: 00.16 00.09 PageListCache end load
21: 00.16 00.09 PageListSources begin
22: 00.16 00.10 PageListSources end count=1006
23: 00.16 00.10 PageListSort pre ret=4 order=name
24: 00.16 00.10 MakePageList items count=1006, filters=
25: 00.17 00.11 MakePageList post count=1006, readc=0
26: 00.17 00.11 PageListSort begin
27: 00.17 00.11 PageListSort sort
28: 00.22 00.15 PageListSort end
29: 00.22 00.15 MakePageList end
30: 00.22 00.16 FPLTemplate: FPLTemplateSliceList
31: 00.22 00.16 FPLTemplate: FPLTemplateFormat
32: 00.45 00.38 MarkupToHTML begin
33: 01.54 01.46 MarkupToHTML end
34: 01.54 01.46 FPLTemplate: Chain end
35: 01.54 01.47 MarkupToHTML end
36: 01.54 01.47 MarkupToHTML begin
37: 01.54 01.47 MarkupToHTML end
38: 01.57 01.50 MarkupToHTML end
39: 01.58 01.51 MarkupToHTML begin
40: 01.61 01.54 ReadApprovedUrls SiteAdmin.ApprovedUrls begin
41: 01.62 01.55 ReadApprovedUrls SiteAdmin.ApprovedUrls end
42: 01.64 01.56 MarkupToHTML end
43: 01.64 01.56 MarkupToHTML begin
44: 01.65 01.58 MarkupToHTML end
45: 01.66 01.58 now