home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Professional / OS2PRO194.ISO / os2 / com / utils / elm / sources / form.gui < prev    next >
Text File  |  1990-04-28  |  11KB  |  400 lines

  1. .\" @(#)$Id: Form.guide,v 4.1 90/04/28 22:41:05 syd Exp $
  2. .\"
  3. .\"  A guide to using the Elm Forms mode
  4. .\"  format with:
  5. .\"    'troff tmac.n - > Forms.format'
  6. .\"
  7. .\"  Elm is now in the public trust. Bug reports, comments, suggestions, flames
  8. .\"  etc. should go to:
  9. .\"    Syd Weinstein        elm@DSI.COM (dsinc!elm)
  10. .\"
  11. .\"  (C) Copyright 1986, 1987 Dave Taylor
  12. .\"  (C) Copyright 1988, 1989, 1990 Usenet Community Trust
  13. .\"
  14. .\"  $Log:    Form.guide,v $
  15. .\" Revision 4.1  90/04/28  22:41:05  syd
  16. .\" checkin of Elm 2.3 as of Release PL0
  17. .\"
  18. .\"
  19. .po 1i
  20. .ds h0
  21. .ds h1
  22. .ds h2
  23. .ds f0
  24. .ds f1
  25. .ds f2
  26. .nr Hy 1
  27. .nr Pt 1
  28. .nr Pi 0
  29. .lg 0
  30. .nf
  31. .na
  32. .rs
  33. .\"  Define the big box macro for troff
  34. .de eb
  35. .sp -1
  36. .nf
  37. .ie t \{\
  38. \h'-.5n'\L'|\\nau-1'\l'\\n(.lu+1n\(ul'\L'-|\\nau+1'\l'|0u-.5n\(ul'
  39. .\}
  40. .el \{\
  41. \h'-.5n'\l'\\n(.lu+1n'
  42. .\}
  43. .fi
  44. ..
  45. .sv |3.0i
  46. .ce 99
  47. .ps 20
  48. .ss 18
  49. .vs 12
  50. \f3Elm Forms Mode Guide\f1
  51. .sp 3
  52. .ps 12
  53. .ss 14
  54. .vs 14
  55. \f2What Forms Mode is, how to use it to create
  56. custom forms, how to reply to forms, and how to
  57. use it for AT&T Mail messages\f1
  58. .sp 2
  59. Dave Taylor
  60. .sp
  61. Hewlett-Packard Laboratories
  62. 1501 Page Mill Road
  63. Palo Alto CA
  64. 94304
  65. .sp 3
  66. email: taylor\s-1@\s+1hplabs.HP.COM  or  hplabs\s-1!\s+1taylor
  67. .sp 3
  68. >>> Elm is now in the public trust. Bug reports, comments, etc. to: <<<
  69. .sp
  70. Syd Weinstein
  71. Datacomp Systems, Inc.
  72. 3837 Byron Road
  73. Huntingdon Valley, PA 19006-2320
  74. .sp
  75. email: elm\s-1@\s+1DSI.COM  or  dsinc\s-1!\s+1elm
  76. .sp 3
  77. .ps 18
  78. \f3\(co\f1\s12 Copyright 1986, 1987 by Dave Taylor
  79. .ps 18
  80. \f3\(co\f1\s12 Copyright 1988, 1989, 1990 by The USENET Community Trust
  81. .ps 10
  82. .ss 12
  83. .vs 12
  84. .fi
  85. .ad
  86. .bp 1
  87. .sv 5v
  88. .ps 14
  89. \f3A Guide to Forms Mode in Elm\f1
  90. .ds h0 "Forms Mode Guide
  91. .ds h1
  92. .ds h2 "Version 2.3
  93. .ds f0 "May 1, 1990
  94. .ds f1 "Page %
  95. .sp
  96. .ps 10
  97. (Version 2.3)
  98. .sp
  99. Dave Taylor
  100. .sp
  101. Hewlett-Packard Laboratories
  102. 1501 Page Mill Road
  103. Palo Alto CA
  104. 94304
  105. .sp
  106. email: taylor\s-1@\s+1hplabs.HP.COM  or  hplabs\s-1!\s+1taylor
  107. .sp 2
  108. >>> Elm is now in the public trust. Bug reports, comments, etc. to: <<<
  109. .sp
  110. .sp
  111. Syd Weinstein
  112. Datacomp Systems, Inc.
  113. 3837 Byron Road
  114. Huntingdon Valley, PA 19006-2320
  115. .sp
  116. email: elm\s-1@\s+1DSI.COM  or  dsinc\s-1!\s+1elm
  117. .sp
  118. May 1, 1990
  119. .ce 0
  120. .sp 2
  121. While there are a lot of mail systems that allow the transmission
  122. of text and primitive pictures, to send and reply to more complex
  123. forms is simply not possible.  \f3Elm\f1, however, took
  124. the forms mode implemented as part of the AT&T Mail package and has
  125. expanded on it to be a smoothly fit part of the overall mail system.
  126. .sp
  127. Forms mode gives you the ability to send `template' files to people
  128. and receive the filled-in replies.\s-2\u1\d\s0
  129. .fn
  130. \f21. note that this feature assumes that the person on the other end
  131. is also using the Elm mail system.\f1
  132. .ef
  133. Let's look at an example right off.
  134. .sp
  135. Say we were going to use computer mail as a way to file defects with
  136. software.  There is a certain amount of information we want to be able
  137. to collect when each report is made, and if it is in a specific format
  138. we can use programs to file the defects upon receipt.
  139. .sp
  140. The form we'll try to emulate starts out looking like:
  141. .\" A manual page break has been done because the 'sd' macro doesn't like
  142. .\" coming up right after the footer or just doesn't like going to a new
  143. .\" page by itself.  The bug has been reported.
  144. .bp
  145. .ft CW
  146. .zf
  147. .sd c
  148. .mk a
  149. .sp
  150. .tl ''Defect Reporting Form''
  151. .sp
  152. .tl 'Program:\ \l'2.3i-\w'Program:\ 'u'''Version:\ \l'1.7i-\w'Version:\ 'u''
  153. .tl 'Operating\ System:\ \l'2.3i-\w'Operating\ System:\ 'u'''Version:\ \l'1.7i-\w'Version:\ 'u''
  154. .sp
  155. .tl 'Defect\ Type:\ \l'2.3i-\w'Defect\ Type:\ 'u'''
  156. .sp
  157. .tl 'Date\ Found:\ \l'2.3i-\w'Date\ Found:\ 'u'''By\ Whom:\ \l'2.3i-\w'By\ Whom:\ 'u'\h'.2i''
  158. .tl 'Date\ Reported:\ \l'2.3i-\w'Date\ Reported:\ 'u'''Phone:\ \l'2.3i-\w'Phone:\ 'u'\h'.2i''
  159. .sp
  160. .tl 'Description:\ \l'6.4i-\w'Description:\ 'u''
  161. .tl '\l'6.4i''
  162. .tl '\l'6.4i''
  163. .sp
  164. .eb
  165. .ed
  166. .ft 1
  167. .sp
  168. This form can actually be created almost exactly as listed above in
  169. the \f3Elm\f1 mail system by using your standard editor and can then
  170. be mailed about as needed.
  171. .sp
  172. Let's say that we want a bit more information, however, especially with
  173. fields like ``Defect Type'', we want to list all the recommended answers.
  174. To create the actual form, we need merely to replace the underlines in
  175. the above form with spaces.  The multi-line comments can simply be
  176. indicated by a `:' by itself on a line;
  177.  
  178. .ft CW
  179. .zf
  180. .sd c
  181. .mk a
  182. .sp
  183. .tl ''Defect Reporting Form''
  184. .sp
  185. .tl 'Program:''Version:\h'1.7i-\w'Version:'u''
  186. .tl 'Operating System:''Version:\h'1.7i-\w'Version:'u''
  187. .sp
  188. .tl '(Valid Defect Types are: user-error, doc-error, fatal, other)'
  189. .tl 'Defect Type:''
  190. .sp
  191. .tl 'Date Found:''By\ Whom:\h'2.3i-\w'By\ Whom:'u''
  192. .tl 'Date Reported:''Phone:\h'2.3i-\w'Phone:'u''
  193. .sp
  194. .tl 'Description'
  195. .tl ':'
  196. .sp
  197. Thank you for filling in this form.
  198. .sp 2
  199. .eb
  200. .ed
  201. .ft 1
  202. .sp
  203. As we can see, it is quite simple to create forms!!
  204. .sp 2
  205. Now that we have an idea what we're talking about, let's actually officially
  206. define the system...
  207. .br
  208. .ne 5
  209. .hu Forms Mode Specification
  210.  
  211. [Note that this is all taken from the document \f2Standard for Exchanging
  212. Forms on AT&T Mail\f1, Version 1.9 of 6/7/86, from AT&T]
  213. .sp
  214. The forms mode is really quite simple.  Simple enough that it is amazing
  215. that it hadn't been implemented before AT&T Mail came along!!
  216. .sp
  217. In a nutshell, each field is delimited by a `:' followed by a number of
  218. blank spaces or tabs that represent the valid size for that field.  That
  219. is, if we have a line in the form like;
  220. .nf
  221. .ti .5i
  222. ``Phone (area-code):\0\0\0\0\0Number:\0\0\0\0\0\0\0\0\0\0''
  223. .fi
  224. The area-code field will be limited to three characters and the number to nine.
  225. (this is kind of hard to see with the proportionally spaced formatted copy,
  226. alas).
  227. The only exception to the rule is that a `:' by itself on a line represents
  228. a field that is as large as the user entering the data desires.
  229.  
  230. The actual form that is transmitted, in AT&T Mail parlance, is a ``SIMPLE''
  231. forms handler message (as opposed to the ``ADVANCED'' handler).  This means
  232. that it contains three sections;
  233. .br
  234. .ne 8
  235. .nf
  236. .in .5i
  237. .ft 2
  238. The Message Header
  239. .ft CW
  240. .zf
  241. [\&OPTIONS-SECTION]
  242. ***
  243. [\&FORMS-IMAGE]
  244. ***
  245. [\&RULES-SECTION]\f1
  246. .in 0
  247. .fi
  248. \f3Elm\f1 generates form messages with the ``options'' section filled out,
  249. but ignores it when receiving mail.  The filled out section is:
  250. .ft CW
  251. .zf
  252. .nf
  253. .in .5i
  254. WIDTH=80
  255. TYPE=SIMPLE
  256. OUTPUT=TEXT\f1
  257. .in 0
  258. .fi
  259. The FORMS-IMAGE section is that described above.  The RULES-SECTION can
  260. contain explicit rules about the possible values of each field, but
  261. this is currently ignored by \f3Elm\f1, being a ``SIMPLE'' forms mode
  262. mail system.
  263. .sp
  264. Forms also have the header ``Content-Type: mailform'' to indicate to the
  265. mail system (either \f3Elm\f1 or AT&T Mail) that a form is being sent.
  266. .sp
  267. \f3Elm\f1 further indicates that a form has been received by having an
  268. ``F'' as the status character in the header display section (instead of
  269. ``N'' for new, etc).
  270. .br
  271. .ne 5
  272. .hu Composing and Sending a Form
  273.  
  274. The first step to enable sending forms is to change the setting of
  275. the variable \f2forms\f1 in your \f2.elm/elmrc\f1 file to ``ON''.  E.g.:
  276. .nf
  277. .ti .5i
  278. forms = ON
  279. .fi
  280. The next step is to send the message to someone using the `m' (\f2mail\f1)
  281. command.  This then will drop you into an editor.  Type in the form as
  282. indicated above, with appropriate colons and comments, and end the entry
  283. by leaving the editor.
  284. .sp
  285. The prompt is now;
  286. .nf
  287. .ft CW
  288. .zf
  289. .tl ''Choose: E)dit msg, edit H)eaders, M)ake form, S)end or F)orget : @''
  290. .ft 1
  291. .fi
  292. so we choose `m' \(em \f2Make form\f1.  The program then will either
  293. rewrite the prompt without the M)ake form option, indicating that
  294. the form has been accepted, or will indicate the problem and give you
  295. a chance to correct it.
  296. .sp
  297. Once it has been accepted, simple use the `s' \(em \f2send message\f1 -
  298. command and it's off!
  299. .sp
  300. \f2Note that you cannot reply to a message with a Form.\f1
  301. .br
  302. .ne 6
  303. .hu Replying to a Form
  304.  
  305. Let's reply to the form message we generated now.  The header page of the
  306. \f3Elm\f1 mail system will indicate that the message is a form by having
  307. an `F' next to it.  So we use `r' to reply and the screen is immediately
  308. cleared and we're prompted, field by field, for the data requested.
  309. Each field has underscores in the input area to indicate the size field that
  310. is expected.
  311. .sp
  312. After answering all the questions we'll have a screen that looks like;
  313.  
  314. .ft CW
  315. .zf
  316. .sd c
  317. .mk a
  318. .sp
  319. .tl ''Defect Reporting Form''
  320. .sp
  321.  Program:  \f3The Elm Mail System\f1\l'3i-\w'\f3The Elm Mail System'u'
  322.  Version:  \f31.5\f1\l'3i-\w'\f31.5'u'
  323.  Operating System:  \f3HP-UX\f1\l'3i-\w'\f3HP-UX'u'
  324.  Version:  \f35.141 C\f1\l'3i-\w'\f35.141 C'u'
  325. .sp
  326.  (Valid Defect Types are: user-error, doc-error, fatal, other)
  327.  Defect Type:  \f3fatal\f1\l'5i-\w'\f3fatal\f1'u'
  328. .sp
  329.  Date Found:  \f310/9/86\f1\l'3i-\w'\f310/9/86\f1'u'
  330.  By Whom:  \f3Dave Taylor\f1\l'3i-\w'\f3Dave Taylor\f1'u'
  331.  Date Reported:  \f310/9/86\f1\l'3i-\w'\f310/9/86\f1'u'
  332.  Phone:  \f3(415) 857-6887\f1\l'3i-\w'\f3(415) 857-6887\f1'u'
  333. .sp
  334.  Description
  335.  (Enter as many lines as needed, ending with a `.' by itself on a line)
  336.    \f3When running it on a CPM system I cannot compile successfully.\f1
  337.    \f3.\f1
  338.  Thank you for filling in this form.
  339. .tl ''Choose: E)dit form, edit H)eaders, S)end or F)orget : @''
  340. .sp
  341. .eb
  342. .ed
  343. .ft 1
  344. .sp
  345. Quite simple.  Notice, however, that the order of prompting is left to
  346. right on each line, so the fields that on the form are placed in what
  347. seems like a logical place, ``By Whom:'' and ``Phone:'' turn out to be
  348. confusing when filling in the actual form since it isn't clear what
  349. ``Phone:'' is being asked for because of the intervention of the
  350. ``Date Reported:'' field.
  351. .sp
  352. The message that will actually be sent out from this will have the
  353. fields in a more acceptable format;
  354. .\" Force page break, as there seems to be a bug in the .sd macro
  355. .bp
  356. .\"
  357. .ft CW
  358. .zf
  359. .mk a
  360. .sp
  361.  WIDTH=80
  362.  TYPE=SIMPLE
  363.  OUTPUT=TEXT
  364.  ***
  365. .tl ''Defect Reporting Form''
  366. .sp
  367. .tl ' Program: The Elm Mail System''Version: 1.5\h'1.5i-\w'Version: 1.5'u''
  368. .tl ' Operating System: HP-UX''Version: 5.141 C\h'1.5i-\w'Version: 5.141 C'u''
  369. .sp
  370. .tl ' (Valid Defect Types are: user-error, doc-error, fatal, other)'
  371. .tl ' Defect Type: fatal''
  372. .sp
  373. .tl ' Date Found: 10/9/86''By Whom: Dave Taylor\h'2.3i-\w'By Whom: Dave Taylor'u''
  374. .tl ' Date Reported: 10/9/86''Phone: (415) 857-6887\h'2.3i-\w'Phone: (415) 857-6887'u''
  375. .sp
  376. .tl ' Description'
  377. .sp
  378.     When running it on a CPM system I cannot compile successfully.
  379. .sp
  380. .tl ' Thank you for filling in this form.'
  381.  ***
  382. .sp
  383. .eb
  384. .ft 1
  385.  
  386. .hu Comments on Forms Mode
  387.  
  388. As was said at the beginning, this way of sending about forms could
  389. prove to be very helpful and useful in a variety of contexts.  On the
  390. other hand, until a more sophisticated forms language is used for the
  391. forms, this should be sufficient to embody the power of the idea.
  392. .sp
  393. I welcome any comments and thoughts on this system and also welcome
  394. possible enhancements.
  395. .sp
  396. I also gratefully thank Dale DeJager of AT&T Information Systems
  397. for sending me more
  398. information on AT&T Mail than I could possibly digest in any finite
  399. amount of time.
  400.