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.08 00.07 MarkupToHTML begin
 3: 00.08 00.07 MarkupToHTML begin
 4: 00.11 00.10 MarkupToHTML end
 5: 00.11 00.10 MarkupToHTML begin
 6: 00.12 00.11 MarkupToHTML end
 7: 00.12 00.11 MarkupToHTML begin
 8: 00.12 00.12 MarkupToHTML end
 9: 00.12 00.12 MarkupToHTML begin
10: 00.13 00.12 MarkupToHTML end
11: 00.13 00.12 MarkupToHTML begin
12: 00.14 00.13 MarkupToHTML end
13: 00.14 00.13 MarkupToHTML begin
14: 00.14 00.13 FPLTemplate begin
15: 00.14 00.13 MakePageList pre
16: 00.14 00.13 PageListCache begin load key=0aec0f8a63f5e289a1085534c104cd1b
17: 00.14 00.13 PageListCache end load
18: 00.14 00.13 PageListSources begin
19: 00.14 00.13 PageListSources end count=860
20: 00.14 00.13 PageListSort pre ret=4 order=name
21: 00.14 00.13 MakePageList items count=860, filters=
22: 00.15 00.14 MakePageList post count=860, readc=0
23: 00.15 00.14 PageListSort begin
24: 00.15 00.14 PageListSort sort
25: 00.21 00.20 PageListSort end
26: 00.21 00.20 MakePageList end
27: 00.38 00.36 MarkupToHTML begin
28: 01.15 01.07 MarkupToHTML end
29: 01.15 01.07 FPLTemplate end
30: 01.16 01.07 MarkupToHTML end
31: 01.16 01.07 MarkupToHTML begin
32: 01.16 01.08 MarkupToHTML end
33: 01.19 01.10 MarkupToHTML end
34: 01.21 01.12 MarkupToHTML begin
35: 01.24 01.16 ReadApprovedUrls SiteAdmin.ApprovedUrls begin
36: 01.25 01.16 ReadApprovedUrls SiteAdmin.ApprovedUrls end
37: 01.28 01.18 MarkupToHTML end
38: 01.28 01.18 MarkupToHTML begin
39: 01.29 01.20 MarkupToHTML end
40: 01.48 01.21 now