Add a parameter to form-horizontal-control affect multiple values
Previously, the behaviour was to accept multiple values, but enable just allowing one value to be entered.
This commit is contained in:
parent
67710065f0
commit
4cc678dfb1
1 changed files with 7 additions and 2 deletions
|
|
@ -107,6 +107,7 @@
|
||||||
help-text
|
help-text
|
||||||
required?
|
required?
|
||||||
options
|
options
|
||||||
|
(allow-selecting-multiple-options #t)
|
||||||
font-family
|
font-family
|
||||||
(type "text"))
|
(type "text"))
|
||||||
(define (value->text value)
|
(define (value->text value)
|
||||||
|
|
@ -146,7 +147,9 @@
|
||||||
(string-append
|
(string-append
|
||||||
"font-family: " font-family ";")
|
"font-family: " font-family ";")
|
||||||
""))
|
""))
|
||||||
(multiple #t)
|
,@(if allow-selecting-multiple-options
|
||||||
|
'((multiple #t))
|
||||||
|
'())
|
||||||
(id ,input-id)
|
(id ,input-id)
|
||||||
,@(if show-help-span?
|
,@(if show-help-span?
|
||||||
`((aria-describedby ,help-span-id))
|
`((aria-describedby ,help-span-id))
|
||||||
|
|
@ -157,7 +160,9 @@
|
||||||
(match (assq (string->symbol input-name)
|
(match (assq (string->symbol input-name)
|
||||||
query-parameters)
|
query-parameters)
|
||||||
((_key . value)
|
((_key . value)
|
||||||
value)
|
(if (not allow-selecting-multiple-options)
|
||||||
|
(list value)
|
||||||
|
value))
|
||||||
(_ '()))))
|
(_ '()))))
|
||||||
|
|
||||||
(map (match-lambda
|
(map (match-lambda
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue