From e68b320eb0b968b558fd5b25b0a11bd5f22bce32 Mon Sep 17 00:00:00 2001 From: interp Date: Tue, 1 Oct 2002 17:40:08 +0000 Subject: [PATCH] allow default text for text input fields --- scheme/httpd/surflets/surflets.scm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scheme/httpd/surflets/surflets.scm b/scheme/httpd/surflets/surflets.scm index 540c3de..d094611 100644 --- a/scheme/httpd/surflets/surflets.scm +++ b/scheme/httpd/surflets/surflets.scm @@ -301,11 +301,13 @@ (define (make-text-input-field . maybe-further-attributes) (let ((name (generate-input-field-name "text"))) (optionals maybe-further-attributes - ((attributes XML-attribute?)) + ((default-text string?) + (attributes XML-attribute?)) (make-input-field name identity `(input (@ (type "text") (name ,name) + ,(and default-text `(value ,default-text)) ;; this will insert a list, but ;; XML->HTML doesn't care about it ,(and attributes (cdr attributes))