Changes from Version 1 of documentation/RML/Forms

Show
Ignore:
Author:
peterc (IP: 192.168.0.1)
Timestamp:
11/19/07 18:14:05 (10 years ago)
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • documentation/RML/Forms

    v0 v1  
     1[[PageOutline(1-5, Contents)]] 
     2= RML Forms = 
     3 
     4A form is a collection of input elements inside a ''FORM'' element - when the form is "submitted", the information stored in the each child input element is sent through to the listening process. 
     5 
     6== FORM Element == 
     7 
     8''Attributes''[[br]] 
     9'''onsubmit = [wiki:documentation/Glossary#BasicTypes cdata]''' [wiki:documentation/Glossary#CaseInformation (CI)] 
     10  The name of the event to trigger when the form is submitted. The values of all form element children are passed to the event as parameters. 
     11 
     12=== FORM Element Children === 
     13 
     14There are four elements that function as children to a ''FORM'' element: the ''INPUT'', ''TEXTAREA'', ''SELECT'' and ''DATASELECT'' elements. These have many common attributes which are listed below. any specific attributes are listed afterwards under their own headings. 
     15 
     16''Attributes''[[br]] 
     17'''name = [wiki:documentation/Glossary#BasicTypes cdata]''' [wiki:documentation/Glossary#CaseInformation (CI)] 
     18  The name of the input element. This is used to look up the element's value when the form is submitted. For types of ''radio'' it is used to group together radio buttons so that only one with the same name can be checked at once. 
     19 
     20'''value = [wiki:documentation/Glossary#BasicTypes cdata]''' [wiki:documentation/Glossary#CaseInformation (CN)] 
     21  For types of ''text'', ''password'' and ''range'', this is used as the initial value of the element. For the ''radio'' and ''checkbox'' types this is used as the value that is submitted if the input is checked. For ''OPTION'' elements, this is the value that is submitted by the parent ''SELECT'', if it is the selected option. 
     22 
     23'''disabled''' [wiki:documentation/Glossary#CaseInformation (CI)] 
     24  If this attribute is set, then the input element is unable to be changed by user input. 
     25 
     26=== INPUT Element === 
     27 
     28''Attributes''[[br]] 
     29'''type = [wiki:documentation/Glossary#BasicTypes cdata]''' [wiki:documentation/Glossary#CaseInformation (CI)] 
     30  The type of the input field. Must be one of: 
     31    * text - A one-line text-entry field. 
     32    * password - Like text, but replaces the entered text with asterisks. 
     33    * radio - A radio button. 
     34    * checkbox - A checkbox. 
     35    * range - A slider bar. 
     36    * submit - A button for submitting the form. 
     37 
     38==== Text and Password types ==== 
     39 
     40'''size = [wiki:documentation/Glossary#BasicTypes number]''' [wiki:documentation/Glossary#CaseInformation (CN)] 
     41  For types of ''text'' and ''password'', defines the length (in characters) of the element. 
     42 
     43'''maxlength = [wiki:documentation/Glossary#BasicTypes number]''' [wiki:documentation/Glossary#CaseInformation (CN)] 
     44  For types of ''text'' and ''password'', defines the maximum length (in characters) that the element will accept. 
     45 
     46==== Radio and Checkbox types ==== 
     47 
     48'''checked''' [wiki:documentation/Glossary#CaseInformation (CI)] 
     49  For types of ''radio'' and ''checkbox'', if this attribute is set then the element is "on". 
     50 
     51==== Range type ==== 
     52 
     53'''min = [wiki:documentation/Glossary#BasicTypes number]''' [wiki:documentation/Glossary#CaseInformation (CN)] 
     54  For the ''range'' type, defines the value at the lowest (left or top) end of the slider. 
     55 
     56'''max = [wiki:documentation/Glossary#BasicTypes number]''' [wiki:documentation/Glossary#CaseInformation (CN)] 
     57  For the ''range'' type, defines the value at the highest (right or bottom) end of the slider. 
     58 
     59'''step = [wiki:documentation/Glossary#BasicTypes number]''' [wiki:documentation/Glossary#CaseInformation (CN)] 
     60  For the ''range'' type, defines the increment that the slider will move by. 
     61 
     62'''orientation = [wiki:documentation/Glossary#BasicTypes cdata]''' [wiki:documentation/Glossary#CaseInformation (CI)] 
     63  For the ''range'' type, specifies if it is a vertical or horizontal slider. Values can be "horizontal" or "vertical". 
     64 
     65=== TEXTAREA Element === 
     66 
     67''Attributes''[[br]] 
     68'''cols = [wiki:documentation/Glossary#BasicTypes number]''' [wiki:documentation/Glossary#CaseInformation (CN)] 
     69  The width of the visible area of the textarea, as a number of columns of text. 
     70 
     71'''rows = [wiki:documentation/Glossary#BasicTypes number]''' [wiki:documentation/Glossary#CaseInformation (CN)] 
     72  The height of the visible area of the textarea, as a number of text rows. 
     73 
     74'''wrap = [wiki:documentation/Glossary#BasicTypes cdata]''' [wiki:documentation/Glossary#CaseInformation (CI)] 
     75  If set "nowrap", the textarea will not wrap unbroken lines to a new row. 
     76 
     77=== SELECT Element === 
     78 
     79Select has no additional parameters. 
     80 
     81==== OPTION Element ==== 
     82 
     83''Attributes''[[br]] 
     84'''selected = [wiki:documentation/Glossary#BasicTypes cdata]''' [wiki:documentation/Glossary#CaseInformation (CI)] 
     85  If set, then the option is selected when the ''SELECT'' element is first loaded. 
     86 
     87=== DATASELECT Element === 
     88 
     89''Attributes''[[br]] 
     90'''source = [wiki:documentation/Glossary#BasicTypes datasource]''' [wiki:documentation/Glossary#CaseInformation (CS)] 
     91  The data source to read the options from. 
     92 
     93'''fields = [wiki:documentation/Glossary#BasicTypes cdata]''' [wiki:documentation/Glossary#CaseInformation (CS)] 
     94  A comma-separated list of fields to fetch from the data source and to display for each option (or optionally to be sent through the data formatter) 
     95 
     96'''valuefield = [wiki:documentation/Glossary#BasicTypes cdata]''' [wiki:documentation/Glossary#CaseInformation (CS)] 
     97  The field from the data source to use as the option's value. If not set, then the first field in the ''fields'' attribute is used. 
     98 
     99'''dataformatter = [wiki:documentation/Glossary#BasicTypes cdata]''' [wiki:documentation/Glossary#CaseInformation (CS)] 
     100  The name of the dataformatter to use to process the raw fields information into RML. If not set, then the fields are displayed in raw text.