# Form Input

The Form interface is a convenient way to create dialogs. It is done by adding different widgets to a form, using a collection of Scheme functions. Each input widget has a name and a value, and the results are returned as an associative list.

Example: form.scm

(form-begin)
  Start a new form
(form-label label)
  Add a label to the form
(form-text name)
  Add a text entry field to the form
(form-withprompt prompt value width)
  Create a label followed by a text field of a specified width
(form-record name name ...)
  Create a form with one label and one text field per line
(form-menu name)
  Add a pull-down menu
(form-menuentry text)
  Add one entry to the menu
(form-okbutton label)
  Add a button which pops down the form, collects the values and returns them
(form-cancelbutton label)
  Add a button which pops down the form, discards the values and returns the empty list
(form-property name value)
  Changes an X property of the most recently added widget
(form-properties name value name value ...)
  Changes several properties in a single call
(form-newline)
  Add the next widget below the last one, rather than to the right
(form-end)
  Pop up the form, wait for the user to do something, return the results