Input & Display Functions information
-------------------------------------

For more information on how this all works, please refer to the source itself, in functions/widgets.php.
The get_input_field(...) (For Input Types) and get_display_field(...) (For Display Types) functions are the
best place to start.

Input Type functions
--------------------

	Currently, the supported input fields are:
    	
  	hidden										Display a hidden field
	readonly									Display a hidden field and a readonly text field
  	text(length,maxlength,display_mask)			Display a text field
	email(length,maxlength)						Display a email field.  Will validate that email
												address is valid.
	filtered(length,maxlength,legalchars)		A filtered text field.  Only characters specified
												in legalchars will be allowed, any others will be
												removed when onChange event fires.  You can specify
												?-? ranges, and include '-', using '\-'.
	date(mask) [NOT IMPLEMENTED]				This field will validate an entered date against
												a specified mask.
	format(mask)[NOT IMPLEMENTED]				This field will validate input against a mask.  Where
												the mask values are: 9 = numbers; X = uppercase letters
												x = lowercase letters.  No other numeral or number is 
												allowed.  Any punctuation, such as '.', '-' will be
												included in the final value sent to the database.
  	checkbox(CHECKED,display_mask)				A really simple little input field, that does not much
												of use.  Not used in OpenDb anymore - kept for backwards
												compatibility, although this is hardly necessary.
												
	checkbox(checked-val,					    This is a new much more powerful checkbox solution.
			unchecked-val,					    This one will be used when the checkbox is called with
			display_mask)						more than two parameters.  You can still use this version
												without specifying the display_mask, by including an extra
												','.  This will only work from 0.50-dev26 onwards as the
												prc_function_spec function has been updated to support this.

	textarea(cols,rows,display_mask)			Displays a textarea with specified 
  	number(length,display_mask)					Display a text field, which can only have numeric input.
  												Numeric fields also have a maxlength exactly the same as 
  												their length.
	
	url(length,maxlength,"ext,ext2,etc")		Similiar to 'saveurl', except this does not provide the
	 											ability to save locally.

	upload(length,maxlength,"ext,ext2,etc")		Upload field, complete with extension validation.  It is
												up to the item_input.php script to ensure that the 
												validations for extensions are performed, in case the
												javascript validations have been bypassed.
												
	saveurl(length,maxlength,"ext,ext2,etc")	As of O.51-dev3 this field serves as a plain text field
												to store a URL value.  This url value may be used in the
												case of IMAGEURL to display a Cover image.  A 'Save'
												checkbox is also included with the field.  If this checkbox
												is checked, and there is a valid external url (The url and
												specified upload directory must accessible by the server 
												running this application), the external URL will be downloaded
												and saved locally.  The attribute value will be updated to
												point at this local copy.  In order to be considered valid,
												the url must end in one of the extensions specified for the 
												first argument.	When item_input.php executes, it will display 
												an error if the file cannot be downloaded.  The URL itself
  												will still be saved to the database if its extension is valid.
	
	upload_or_saveurl(length,maxlength,"ext,ext2,etc")			
												A combination of both upload/saveurl widgets.  It will include
												both the saveurl and upload form input fields.  The upload
												part of the field will be checked first (as a normal 'upload'
												widget would be) and if a valid FILE_UPLOAD is found, it will
												be processed as normal.  Otherwise the 'saveurl' portion will
												be accessed, and processed as per 'saveurl' functionality.  If
												neither of the fields are processed the default functionality is
												to restore the previous value of the field, or in the case of
												'saveurl' (if the URL has a valid extension), the URL itself
												will be saved.

	For check_boxes and radio_group versions with a vertical_ or horizontal_ prefix and no orientation will
	still resolve correctly.

	**** Special case - only used in item_review.php
	review_options(display_mask, orientation)	Displays a list of options, with stars beside.  Replaces
												the logic in item_review.php.

	Note: For all the above, orientation corresponds to HORIZONTAL or VERTICAL

	radio_grid(display_mask,columns,border)		Display radio group in a grid of columns wide.
	checkbox_grid(display_mask,columns,border)	Display checkboxes in a grid of columns wide.
	
  	single_select(display_mask, length)			A single select list
	multi_select(display_mask, length, size)	A multi select list

	value_select(values, size)					A select widget which will generate an lov based on the comma
												delimited list of values specified for the first argument.
												In order to get this to work, you will need to enclose the
												values argument in double quotes.  If $size>1, a MULTIPLE 
												select object will be generated.  The fieldname will be 
												modified so that it returns an array via HTTP.

	Note: The s_attribute_type is for generating the lookup records.

	@param $dowrap 		Specify whether the field should be wrapped using format_field before
						returning.  Fields of type hidden will ignore this variable even if true.
	@param $promp_mask	The %prompt% variable will be replaced with the actual prompt.
						This parameter will be ignored if $dowrap is FALSE.
   	@param $onchange_event	
						Specify extra javascript for onchange event handler.  	
	 					The onchange event is passed to widgets:
							'textarea', 'text', 'url', 'saveurl', 'filtered', 'number', 'email',
							'single_select', 'multi_select','value_select'
							
						For compatibility with older browsers the widgets:
							'simple_checkbox', 'checkbox' use the 'onclick' event instead.

	The compulsory indicator is only of use for straight text input fields.  The lookups already enforce
	entering a value, by allowing the selection of a default in the s_attribute_type_lookup table.
    
Note:
-----
	The display_mask argument for single_select and multi_select only supports the %value% and %display% specifiers.

	The other functions support all three %img%, %value% and %display%.  If the %img% column has no value, then
	the %value% is used instead.  However if the %img% has a value of "none", then the image tag will be replaced
	with an empty string.


Display Type functions
----------------------

		split(delimiter,[nl2br | ordered | unordered | ticks][, list-link])
						Will split text up based on first argument 'delimiter'.  If the
						second argument is 'list-link, then no third argument is 
						processed.

							The options for the second argument (if not 'list-link') are:
								nl2br
								ordered
								unordered
								ticks

							Formatting for each of these will be ignored if only one
							value specified.

		nl2br			Will convert all newlines to <br>.  Will trim the string first
						so that any newlines on either end of the string are not converted.

		ordered_list	Will generate a numbered list of all lines, will trim the string
						first...

		unordered_list	Will generate a bulleted list of all lines, will trim the string
						first...
		
		ticks_list		Will generate a ticks (A image of a red tick) list of all lines, 
						will trim the string first...
		
		format_mins		Expects a int value of total minutes, and will format it according to 
						the specified mask.  The default mask is: "%h %H %m %M"
				
							%h - hour value only
						    %H - text "hour" or "hours"
						    %m - minute value only
						    %M - text "minute" or "minutes"
	
						In the case where an hour value is not available, because the total 
						minutes is less than 60, then everything in the mask before the %m
						or %M will be ignored.
		
		display(display_mask [, list-link])
						This is a new function to allow the inclusion of a list-link for what would
						have originally been specified as a %display% or %value% type mask, without
						functional reference.  Now you can specify the display mask and an optional
						list-link argument.  This is the preferred means of specifying a display
						type for a field, even if the list-link argument is not used.

		category(display_mask [, list-link])
						Special 'CATEGORY' display_type.  Will split the category values according to 
						matches in s_attribute_type_lookup table and display as 'category / category' etc.

		hidden			Allows users to disable display of fields that were, either previously automatically
						populated by a site plugin, or were originally display attributes that are now
						no longer required.

		For display_mask:
			Options are %img%, %value%, %display% variables.
	
	Note:
	-----

		If you have any display attributes, that should only ever display %value%, ensure that the 
		s_attribute_type.display_type column is explicitly set to '%value%' as this will provide a performance
		improvement.

		The default display_type is %value% which will be process with nl2br($value) to ensure that newlines
		are maintained in the attribute value displayed.


