Forms

Forms in HTML are a method of allowing the user to enter and return data to the website, so even the simplest of forms needs to have some kind of web browser backend, this can be JSP, PHP, or a simple CGI script.Forms can contain items such as text boxes, radio buttons, push button, and lists. A user can enter information into the form and "submit" the information back to the web server, that information can then be interpreted by a program on the web server and used in any way. In forms, each item such as a text box, has a "name" attribute, and it is this attribute which is used to identify information passed back to the web server. The "id" and "class" attributes can be used in forms, but their values are largely irrelevant once the form is submitted back to the web server.

Creating a simple form in Flux

First, create a div, now select the div, and in the Inspector palette, click on the Cog icon, and choose "Form settings". You will be presented with a sheet with many options, but for a simple form you only need to set a couple of them. First make sure the submit type is set to "GET" and not "POST", this is the simplest way to pass data to web server. Next, set the "action" field to the path of a CGI script present on your web server. EXAMPLES.. Now you can click "OK", and you' ve now got a form inside the div. A form is not a lot of use without items within it, so now we can select the div, and add any form item we want from the "New object" menu. Try adding a single textbox and a button. You can now quickly try out the form by previewing the page, and clicking the button.