Web Design |
topic title |
||
main menushelp pagesprinter-friendly/text-only version your accountUse your ACOM account to access the discussion boards, submit course work and check marks and feedback Page contents |
What are forms?Forms are the simplest way to get some genuine interactivity on your site. Having got this far with your HTML, you might be wondering when you will be being taught to write the sort of applications that appear on, say, e-commerce sites: where users can not only browse the pages, but actually buy things. Or "chat rooms", where you can post messages to a web site in the same way you can to a Usenet bulletin board. Well... don't get your hopes up too high, people. The intention of this whole course is only to give you a good starting point towards fully professionalised web design. To fully design sites which work in this way you will need a familiarity with some proper programming languages such as Perl or SQL. These are well beyond the scope of this course, and indeed of ACOM as a whole. But what we can show you are the "front ends" of these interfaces between the owners of a site and the readers: and forms comprise that front end. The best way to show you what a form is, is simply to include one. This form is used again on the page about form input types, where the different elements are discussed properly; for now, it's just an example which you can try using for yourself. Hopefully you're at least vaguely familiar with the idea of having "boxes" like this on a web page which you can click and/or type: well, those are forms, however complex or simple they are in practice. (Please note that this form will "work", in that when you click on "Submit", a message will be sent. However, it will be sent to a false e-mail address so you may receive a "message undelivered" mail following your submission. It's still a good idea to submit the form though, as that way you'll see what should happen.) This is one of the common uses of forms: as feedback from your readers. This can be elaborated on: perhaps you want to ask if readers want to join a mailing list, in which case you need their address details (online ones, or offline). There are other possibilities, limited only by your imagination, or the general theme of your site. But as the pages for this topic will suggest (and as you may have already spotted on some earlier pages of this site), there are other applications of forms. Even if you don't want information back from the user, forms provide a clickable, interactive space; what's more, they do it in a way that almost all browsers can handle, even quite old and clunky ones. So it's definitely worth knowing how to put this kind of thing on your site. The nature of formsWhat is important to realise is that with forms there are two almost entirely separate things going on. The first is the placing of the form "boxes" on the page. This is the easy bit! The second is the processing of the inputted data; which is much more involved. With regard to the first aspect, you will need to know about the <forM> tag, the different input types, and the use of form buttons. These are the three things you need to actually get a form appearing on your page. The processing of the form is more complex and I can only begin to go into detail here. Partly this is because you need special programming skills to process a very involved form (of the sort that appears on e-commerce or other fully interactive sites, where the server will transmit a page back to you that depends on the information you sent on a form just before). If you do know this kind of thing already, congratulations... If you're interested in learning more, some suggestions for further reading and study are included on the links that follow. Simpler methods are available, however: the simplest of all being sending the form input by e-mail. To use this (or indeed any other form of processing) you will need to know about name-value pairs; go on from there to the page on form processing. |
Material on this site is © Drew Whitworth, 2005 Permission will usually be given to reproduce material from this site for non-commercial purposes, if credit is given. For enquiries, e-mail Drew at andrew [dot] whitworth [at] manchester [dot] ac [dot] uk.