Elements of forms

Form elements are standard controls used to populate values, which are then passed to the web server.

In Table. 1 presents the basic elements with their parameters and examples.

Table. 1. Elements of forms
Parameter Description Example
Text field
Size The width of the field.
Maxlength. The maximum number of characters allowed in the text.
Name The name of the field. It is intended for the form handler to be able to identify this field.
Value The initial text is in the field.
Multiline text
Name The name of the field.
Cols Number of columns of text.
Rows The number of lines of text.
Wrap String transfer options. Possible values ​​are:
Off - disables line wrapping;
Virtuals - shows line breaks, but sends text as it is entered;
Physical - line breaks are inserted where specified and in this form the text is sent.
Password
Name The name of the field.
Value The value of the field determines what will be sent to the server.
Button
Name The name of the field.
Value The value of the field determines what will be sent to the server. Simultaneously acts as an inscription text.
SUBMIT button
Name The name of the field.
Value The text on the button.
RESET button
Name The name of the field.
Value The text on the button.
Checkbox
Name The name of the field.
Value The value of the field determines what will be sent to the server when the checkmark is ticked.
Checked If this parameter is checked, a check mark in the field will be added automatically.
Switches (radiobutton)
Name The name of the field.
Value The value of the field determines what will be sent to the server when the switch is selected.
Combo Box
Select
Name The name of the field.
Size The number of rows displayed.
Multiple This option allows you to select several lines at the same time
Option
Selected Visible default field.
Value The value determines what will be sent to the server when the list item is selected.
Button with image
Name The name of the field.
Src The URL of the image (the path to the graphic file).

Copyright © www.htmlbook.ru