<\body> As explained in ``'' the available widgets can be used to compose dialog windows which perform one simple task. But sometimes one needs to read complex input from the user and forms provide one mechanism to do this. They allow you to define multiple named fields of several types, whose values are stored in a hash table. The contents of this hash can be retrieved when the user clicks a button using the functions and . In the following example you can see that the syntax is pretty much the same as for regular widgets, but you must prefix the keywords with : <\session|scheme|default> <\folded-io|Scheme] > (tm-widget (form3 cmd) \ \ (resize "500px" "500px" \ \ \ \ (padded \ \ \ \ \ \ (form "Test" \ \ \ \ \ \ \ \ (aligned \ \ \ \ \ \ \ \ \ \ (item (text "Input:") \ \ \ \ \ \ \ \ \ \ \ \ (form-input "fieldname1" "string" '("one") "1w")) \ \ \ \ \ \ \ \ \ \ (item === ===) \ \ \ \ \ \ \ \ \ \ (item (text "Enum:") \ \ \ \ \ \ \ \ \ \ \ \ (form-enum "fieldname2" '("one" "two" "three") "two" "1w")) \ \ \ \ \ \ \ \ \ \ (item === ===) \ \ \ \ \ \ \ \ \ \ (item (text "Choice:") \ \ \ \ \ \ \ \ \ \ \ \ (form-choice "fieldname3" '("one" "two" "three") "one")) \ \ \ \ \ \ \ \ \ \ (item === ===) \ \ \ \ \ \ \ \ \ \ (item (text "Choices:") \ \ \ \ \ \ \ \ \ \ \ \ (form-choices "fieldname4"\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ '("one" "two" "three")\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ '("one" "two")))) \ \ \ \ \ \ \ \ (bottom-buttons \ \ \ \ \ \ \ \ \ \ ("Cancel" (cmd "cancel")) \\ \ \ \ \ \ \ \ \ \ \ ("Ok" \ \ \ \ \ \ \ \ \ \ \ (display* (form-fields) " -\ " (form-values) "\\n") \ \ \ \ \ \ \ \ \ \ \ (cmd "ok"))))))) <|folded-io> \; <\input|Scheme] > (dialogue-window form3 (lambda (x) (display* x "\\n")) "Test of form3") A complete list of the widgets you can embed in a form is in the table inside . team.> <\initial> <\collection>