EEllmm FFoorrmmss MMooddee GGuuiiddee _W_h_a_t _F_o_r_m_s _M_o_d_e _i_s_, _h_o_w _t_o _u_s_e _i_t _t_o _c_r_e_a_t_e _c_u_s_t_o_m _f_o_r_m_s_, _h_o_w _t_o _r_e_p_l_y _t_o _f_o_r_m_s_, _a_n_d _h_o_w _t_o _u_s_e _i_t _f_o_r _A_T_&_T _M_a_i_l _m_e_s_s_a_g_e_s The Elm Mail System (Version 2.4) Syd Weinstein, Elm Coordinator Datacomp Systems, Inc. 3837 Byron Road Huntingdon Valley, PA 19006-2320 email: elm@DSI.COM or dsinc!elm Copyright 1986,1987 by Dave Taylor Copyright 1988-1992 by The USENET Community Trust AA GGuuiiddee ttoo FFoorrmmss MMooddee iinn EEllmm (The Elm Mail System, Version 2.4) October 1, 1992 Syd Weinstein Datacomp Systems, Inc. 3837 Byron Road Huntingdon Valley, PA 19006-2320 email: elm@DSI.COM or dsinc!elm Derived from "The Elm Mail System, Version 2.0" by Dave Taylor Intuitive Systems Mountain View, California email: taylor@intuitive.com or limbo!taylor While there are a lot of mail systems that allow the transmission of text and primitive pictures, to send and reply to more complex forms is simply not possible. Elm, however, took the forms mode implemented as part of the AT&T Mail package and has expanded on it to be a smoothly fit part of the overall mail system. Forms mode gives you the ability to send "template" files to peo- ple and receive the filled-in replies.1 Let's look at an example right off. Say we were going to use computer mail as a way to file defects with software. There is a certain amount of information we want to be able to collect when each report is made, and if it is in a specific format we can use programs to file the defects upon __________ 1. Note that this feature assumes that the person on the other end is also using the Elm mail system, that both yourself and the person on the other end have their user levels set to something other than _B_e_g_i_n_n_e_r (00) and the ffoorrmmss variable set ON in their _._e_l_m_/_e_l_m_r_c files. Forms Mode Guide Version 2.4 Forms Mode Guide Version 2.4 receipt. The form we'll try to emulate starts out looking like: October 1, 1992 Page 2 Forms Mode Guide Version 2.4 Defect Reporting Form Program: ______________ Version: ________ Operating System: _____ Version: ________ Defect Type: __________ Date Found: ___________ By Whom: ______________ Date Reported: ________ Phone: ________________ Description: ___________________________________________________ ________________________________________________________________ ________________________________________________________________ __________________________________________________________________ This form can actually be created almost exactly as listed above in the Elm mail system by using your standard editor and can then be mailed about as needed. Let's say that we want a bit more information, however, especial- ly with fields like _D_e_f_e_c_t _T_y_p_e, we want to list all the recom- mended answers. To create the actual form, we need merely to re- place the underlines in the above form with spaces. The multi- line comments can simply be indicated by a ':' by itself on a line: Defect Reporting Form Program: Version: Operating System: Version: (Valid Defect Types are: user-error, doc-error, fatal, other) Defect Type: Date Found: By Whom: Date Reported: Phone: Description : Thank you for filling in this form. __________________________________________________________________ As you can see, it is quite simple to create forms!! Now that you have an idea what we're talking about, let's actual- ly officially define the system. October 1, 1992 Page 3 Forms Mode Guide Version 2.4 FFoorrmmss MMooddee SSppeecciiffiiccaattiioonn [Note that this is all taken from the document _S_t_a_n_d_a_r_d _f_o_r _E_x_- _c_h_a_n_g_i_n_g _F_o_r_m_s _o_n _A_T_&_T _M_a_i_l, Version 1.9 of 6/7/86, from AT&T.] The forms mode is really quite simple. Simple enough that it is amazing that it hadn't been implemented before AT&T Mail came along!! In a nutshell, each field is delimited by a ':' followed by a number of blank spaces or tabs that represent the valid size for that field. That is, if we have a line in the form like: Phone (area-code): Number: The area-code field is limited to three characters and the number to nine (this is kind of hard to see with the proportionally spaced formatted copy, alas). The only exception to the rule is that a ':' by itself on a line represents a field that is as large as the user entering the data desires. The actual form that is transmitted, in AT&T Mail parlance, is a "SIMPLE" forms handler message (as opposed to the "ADVANCED" han- dler). This means that it contains three sections: _T_h_e _M_e_s_s_a_g_e _H_e_a_d_e_r _[_O_P_T_I_O_N_S_-_S_E_C_T_I_O_N_] _*_*_* _[_F_O_R_M_S_-_I_M_A_G_E_] _*_*_* _[_R_U_L_E_S_-_S_E_C_T_I_O_N_] Elm generates form messages with the _O_P_T_I_O_N_S_-_S_E_C_T_I_O_N filled out, but ignores it when receiving mail. The filled out _O_P_T_I_O_N_S_-_S_E_C_- _T_I_O_N is: WIDTH=80 TYPE=SIMPLE OUTPUT=TEXT The _F_O_R_M_S_-_I_M_A_G_E section is that described above, i.e. prompting text followed by a ':', followed by spaces or tabs. The _R_U_L_E_S_- _S_E_C_T_I_O_N can contain explicit rules about the possible values of each field, but this is currently ignored by Elm, being a "SIM- PLE" forms mode mail system. Forms also have the header "Content-Type: mailform" to indicate to the mail system (either Elm or AT&T Mail) that a form is being sent. Elm further indicates that a form has been received by having an 'F' as the status character in the header display section (in- stead of 'N' for new, etc). October 1, 1992 Page 4 Forms Mode Guide Version 2.4 CCoommppoossiinngg aanndd SSeennddiinngg aa FFoorrmm The first step to enable sending forms is to change the setting of the variable ffoorrmmss in your _._e_l_m_/_e_l_m_r_c file to ON: forms = ON The next step is to send the message to someone using the mm (mmaaiill) command, which drops you into an editor. Type in the form as indicated above, with appropriate colons and comments, and end the entry by leaving the editor. The prompt is now: Choose: E)dit msg, edit H)eaders, M)ake form, S)end or F)orget : @ so we choose mm -- mmaakkee ffoorrmm. Elm then either rewrites the prompt without the "M)ake form" option, indicating that the form has been accepted, or indicates the problem and gives you a chance to correct it. Once it has been accepted, simply use the ss -- sseenndd mmeessssaaggee -- command and it's off! Note that you cannot reply to a message with a form. RReeppllyyiinngg ttoo aa FFoorrmm Let's reply to the form message we generated now. The header page of the Elm mail system indicates that the message is a form by having an 'F' next to it. So we use rr to reply and the screen is immediately cleared and we're prompted, field by field, for the data requested. Each field has underscores in the input area to indicate the size field that is expected. After answering all the questions we'll have a screen that looks like: October 1, 1992 Page 5 Forms Mode Guide Version 2.4 Defect Reporting Form Program: TThhee EEllmm MMaaiill SSyysstteemm___________ Version: 11..55___________________________ Operating System: HHPP--UUXX_________________________ Version: 55..114411 CC_______________________ (Valid Defect Types are: user-error, doc-error, fatal, other) Defect Type: ffaattaall_____________________________________________ Date Found: 1100//99//8866_______________________ By Whom: DDaavvee TTaayylloorr___________________ Date Reported: 1100//99//8866_______________________ Phone: ((441155)) 885577--66888877________________ Description (Enter as many lines as needed, ending with a '.' by itself on a line) WWhheenn rruunnnniinngg iitt oonn aa CCPPMM ssyysstteemm II ccaannnnoott ccoommppiillee ssuucccceessssffuullllyy.. .. Thank you for filling in this form. Choose: E)dit form, edit H)eaders, S)end or F)orget : @ __________________________________________________________________ Quite simple. Notice, however, that the order of prompting is left-to-right on each line, so the fields, _B_y _W_h_o_m_: and _P_h_o_n_e_:, although placed in what seems like a logical place on the form, turn out to be confusing when filling in the received form since it isn't clear what _P_h_o_n_e_: is being asked for because of the in- tervention of the _D_a_t_e _R_e_p_o_r_t_e_d_: field. The message that is actually sent out from this has the fields in a more acceptable format: October 1, 1992 Page 6 Forms Mode Guide Version 2.4 WIDTH=80 TYPE=SIMPLE OUTPUT=TEXT Defect Reporting Form *** Program: The Elm Mail System Version: 1.5 Operating System: HP-UX Version: 5.141 C (Valid Defect Types are: user-error, doc-error, fatal, other) Defect Type: fatal Date Found: 10/9/86 By Whom: Dave Taylor Date Reported: 10/9/86 Phone: (415) 857-6887 Description When running it on a CPM system I cannot compile successful- ly. Thank you for filling in this form. *** __________________________________________________________________ CCoommmmeennttss oonn FFoorrmmss MMooddee As was said at the beginning, this way of sending about forms could prove to be very helpful and useful in a variety of con- texts. On the other hand, until a more sophisticated forms lan- guage is used for the forms, this should be sufficient to embody the power of the idea. I welcome any comments and thoughts on this system and also wel- come possible enhancements. I also gratefully thank Dale DeJager of AT&T Information Systems for sending me more information on AT&T Mail than I could possi- bly digest in any finite amount of time. October 1, 1992 Page 7