Page Updated: 9/6/97
formObjects is a simple suite that provides scripts for generating HTML tags for form objects like buttons, text boxes, radio buttons, checkboxes, & popups. The suite is essentially a glossary of form objects. If you need a text input call formObject.text(name,value,size) and the script will return a properly formatted HTML input tag. Similarly calling formObject.select(Name,optionlist,item) will product HTML for a popup menu with as many options as in option list, with item selected as the default value.
formObjects does not provide an exhaustive treatment of potential form settings. It ignores a number of attributes (primarily because I don't use them). If, however, you need an additional attributes, the scripts can be modified very easily. Just add a variable and tack on the appropriate text in the script. Future versions may be more inclusive of potential attributes, if there is something that you want, ask. The oneliners in the example table provide a pretty good idea of the supported attributes for each object.
I have also added several templates that can be used with formObjects to help generate forms. The templates provide the base HTML for producing a table. I use the templates in CGIs to develop "dialog boxes". To use them, substitute the formObjects that you want to input for cell references (ie string.replace(formObjects.templates.table3x4,"r1c1",formObjects.submit("Send") will put a "Send" button into the row1 column1 table cell). After you have added all of your form items to the template add the template to your HTML text (within a CGI, call add(string(formObjects.templates.table3x4).
You can use this approach to build fairly complex, but orderly HTML forms in this manner. For example one of the templates can be used to build a disk browser, similar to the standard Mac file browser. An example of the diskBrowser CGI is included in the examples subtable. To use it, you will need the CGI framework (either 4.2b or 3.0.1 with webSTAR or QPQ) and a web server. With the framework installed, copy the diskBrowser script to the webserverscripts table.
NOTE! The diskBrowser CGI lets people navigate all HFS drives on your system and view text files on those drives with a web browser. This is a security risk and proper precautions should be made. If you are not clear on this, don't use the diskBrowser CGI. If you use the diskBrowser CGI, you do so at your own risk. By downloading formObjects or using the diskBrowser CGI, you agree that Thomas R. Clifton and ES Designs are not liable for any loss or damages caused by their use.
You can download formObjects from:
Alternatively, this is a Fat Page, if you have a "Fat-capable browser" and are running Frontier 4.2.2 or greater, you can load the script directly into your object database. If you grab formObjects as a Fat Page, you will need to run the init script to install the formObjects menu.