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]]
|