HTML Types

The atomic datatype suffices for internal storing and processing of data but for presentation we have to go further. To add fields to HTML forms, the HTML type must be established. These are listed as follows:-

 HTMLTYPE_TEXT Full range of printable chars
 HTMLTYPE_PASSWORD As text but char's won't print
 HTMLTYPE_TEXTAREA As text but a text area is described
 HTMLTYPE_SELECT A HTML selector
 HTMLTYPE_CHECKBOX A HTML checkbox
 HTMLTYPE_RADIO A HTML radio button set
 HTMLTYPE_FILE File uploaded
 HTMLTYPE_HIDDEN Hidden field

And here is how HTML types relate to atomic HadronZoo data types:-

 Group 1: Fundamental C++ types (fixed size)  
 BASETYPE_DOUBLE 64 bit floating point value TEXT
 BASETYPE_INT64 64-bit Signed integer TEXT
 BASETYPE_INT32 32-bit Signed integer TEXT
 BASETYPE_INT16 16-bit Signed integer TEXT
 BASETYPE_BYTE 8-bit Signed integer TEXT
 BASETYPE_UINT64 64-bit Positive integer TEXT
 BASETYPE_UINT32 32-bit Positive integer TEXT
 BASETYPE_UINT16 16-bit Positive integer TEXT
 BASETYPE_UBYTE 8-bit Positive integer TEXT
 BASETYPE_BOOL True or false CHECKBOX
 Group 2: HadronZoo Defined types (fixed size)  
 BASETYPE_TBOOL True/False/Not Stated SELECT/RADIO
 BASETYPE_DOMAIN Internet domain TEXT
 BASETYPE_EMADDR Email Address TEXT
 BASETYPE_URL Universal Resource Locator TEXT
 BASETYPE_IPADDR IP Address TEXT
 BASETYPE_TIME Time of the form hh:mm:ss TEXT
 BASETYPE_SDATE Date YYYY/MM/DD or MM/DD/YYYY or DD/MM/YYYYTEXT
 BASETYPE_XDATE Full date and time (Many formats allowed) TEXT
 BASETYPE_STRING String, single value TEXT/PASSWORD
 BASETYPE_TEXT String, indexable text TEXTAREA
 BASETYPE_BINARY Binary object, assummed un-indexable FILE
 BASETYPE_TXTDOC Document (possible text source) TEXTAREA/FILE
 Group 3: Application defined data enumerations  
 BASETYPE_ENUM Data enumeration HTMLTYPE_SELECT/RADIO
 Group 4: Application defined special text types  
 BASETYPE_APPDEF String App Specific (e.g. serial numbers) HTMLTYPE_TEXT

Note that while the stated HTML type of a field is checked against the known data type, there is no automatic mapping between data types and HTML types because in most cases there is an option on the latter. Although not indicated in the above table, all the data types which are or can be HTMLTYPE_TEXT can also be HTMLTYPE_HIDDEN.