Make the form-horizontal-control procedure aware of hidden inputs
Signed-off-by: Christopher Baines <mail@cbaines.net>
This commit is contained in:
parent
ecd460867b
commit
14cd95f244
1 changed files with 125 additions and 115 deletions
|
|
@ -133,6 +133,16 @@
|
|||
(invalid-query-parameter? val))))
|
||||
(show-help-span?
|
||||
(or help-text has-error? required?)))
|
||||
(if (string=? type "hidden")
|
||||
`(input (@ (class "form-control")
|
||||
(id ,input-id)
|
||||
(type ,type)
|
||||
(name ,input-name)
|
||||
,@(match (assq (string->symbol input-name)
|
||||
query-parameters)
|
||||
(#f '())
|
||||
((_key . value)
|
||||
`((value ,(value->text value)))))))
|
||||
`(div
|
||||
(@ (class ,(string-append
|
||||
"form-group form-group-lg"
|
||||
|
|
@ -249,7 +259,7 @@
|
|||
,@(if help-text
|
||||
(list help-text)
|
||||
'())))
|
||||
'())))))
|
||||
'()))))))
|
||||
|
||||
(define (readme contents)
|
||||
(layout
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue