#lang racket/base
(require "sxml.rkt")
(provide fill-in-the-blank
free-response)
(define (fill-in-the-blank #:id id
#:columns (width 50)
#:label (label #f)
)
(sxml->element `(input (@ (type "text")
(id ,id)
(width ,(number->string width))
,@(if label
`((placeholder ,label))
'()))
"")))
(define (free-response #:id id
#:columns (width 50)
#:rows (height 20)
#:label (label #f)
)
(sxml->element `(textarea (@ (id ,id)
(cols ,(number->string width))
(rows ,(number->string height))
,@(if label
`((placeholder ,label))
'()))
"")))