Below is a list of the available default Radria field types. In context form, all of the registry fields generate HTML Form fields and are set with the default “class=adformfield” Included is a detailed list of all field types and how they are used.
Example:
<rfield name="firstname"> <rdata type="required">1</rdata> <rdata type="default">Your Name</rdata> <rdata type="label">First Name</rdata> <rdata type="textline">10:30</rdata> <rdata type="fieldtype">strFBFieldTypeChar</rdata> <rdata type="databasetype">varchar</rdata> </rfield>
Exemple:
<rfield name="accepteterms"> <rdata type="checked_value">Yes</rdata> <rdata type="default">Yes</rdata> <rdata type="label">Do you accept the terms</rdata> <rdata type="fieldtype">strFBFieldTypeCheckBox</rdata> <rdata type="checkbox">1</rdata> <rdata type="databasetype">varchar</rdata> </rfield>
Example:
<rfield name="email_field"> <rdata type="email">1</rdata> <rdata type="label">Email field</rdata> <rdata type="textline">20:40</rdata> <rdata type="fieldtype">strFBFieldTypeEmail</rdata> <rdata type="databasetype">varchar</rdata> </rfield>
Example:
<rfield name="productpricture"> <rdata type="label">Picture of the product</rdata> <rdata type="picture">dbimage</rdata> <rdata type="showpicture">1</rdata> <rdata type="overwrite">no</rdata> <rdata type="fieldtype">strFBFieldTypeFile</rdata> <rdata type="databasetype">varchar</rdata> </rfield>
This example will upload files to the dbimage directory.
Example:
<rfield name="distance"> <rdata type="label">distance in miles</rdata> <rdata type="textline">5:10</rdata> <rdata type="fieldtype">strFBFieldTypeFloat</rdata> <rdata type="databasetype">float</rdata> </rfield>
Example:
<rfield name="age"> <rdata type="default">28</rdata> <rdata type="label">integer</rdata> <rdata type="textline">2:2</rdata> <rdata type="fieldtype">strFBFieldTypeInt</rdata> <rdata type="databasetype">integer</rdata> </rfield>
<rdata type=”list”>
{table name}:{field name to insert in current field}:{field name to display}:{default value}:{ sqlSavedQuery name}
</rdata>
Example:
<rfield name="states"> <rdata type="list">states:shortname:fullname:0:</rdata> <rdata type="label">States</rdata> <rdata type="fieldtype">strFBFieldTypeListBox</rdata> </rfield>
Example:
<rfield name="includefiles"> <rdata type="listfile">./:.inc.php:</rdata> <rdata type="fieldtype">strFBFieldTypeListBoxFile</rdata> <rdata type="databasetype">varchar</rdata> </rfield>
<rdata type=”listvalues”>{value1}:{value2}:{value3}</rdata>
<rdata type=”listlabels”>{label1}:{label2}:{label3}</rdata>
Example:
<rfield name="typeperiode"> <rdata type="listvalues">D:W:M:Y</rdata> <rdata type="listlabels">Day:Week:Month:Year</rdata> <rdata type="fieldtype">strFBFieldTypeListBoxSmall</rdata> <rdata type="databasetype">varchar</rdata> <rdata type="emptydefault">no</rdata> </rfield>
Example:
<rfield name="username"> <rdata type="label">Username</rdata> <rdata type="access">login</rdata> <rdata type="textline">20:40</rdata> <rdata type="fieldtype">strFBFieldTypeLogin</rdata> <rdata type="databasetype">varchar</rdata> </rfield>
Example:
<rfield name="password"> <rdata type="label">Password</rdata> <rdata type="access">password</rdata> <rdata type="fieldtype">strFBFieldTypePassword</rdata> <rdata type="databasetype">varchar</rdata> </rfield>
Example:
<rfield name="answer"> <rdata type="label">Select one answer</rdata> <rdata type="fieldtype">strFBFieldTypeRadioButton</rdata> <rdata type="radiobutton">answers:idanswers:description:</rdata> <rdata type="databasetype">varchar</rdata> </rfield>
<rdata type=”radiovalues”>{value1}:{value2}:{value3}</rdata>
<rdata type=”radiolabels”>{label1}:{label2}:{label3}</rdata>
Example:
<rfield name="gender"> <rdata type="radiovalues">M:F</rdata> <rdata type="radiolabels">Male:Female</rdata> <rdata type="fieldtype">strFBFieldTypeRadioButtonSmall</rdata> <rdata type="databasetype">varchar</rdata> </rfield>
Example:
<rfield name="comments"> <rdata type="label">Your Comments</rdata> <rdata type="substring">50</rdata> <rdata type="textarea">50:10:</rdata> <rdata type="html">1</rdata> <rdata type="fieldtype">strFBFieldTypeText</rdata> <rdata type="htmleditor">Click here to open the HTMLEditor</rdata> <rdata type="databasetype">text</rdata> </rfield>
Example:
<rfield name="creationdate"> <rdata type="label">Document creation date</rdata> <rdata type="datef">m/d/Y:today:</rdata> <rdata type="fieldtype">strfFBFieldTypeDate</rdata> <rdata type="databasetype">integer</rdata> </rfield>
Example:
<rfield name="invoiceDate"> <rdata type="label">Invoice Date</rdata> <rdata type="datesql">m/d/Y:today::</rdata> <rdata type="fieldtype">strFBFieldTypeDateSQL</rdata> <rdata type="databasetype">date</rdata> </rfield>
Example:
<rfield name="loginTime"> <rdata type="timef">now:1</rdata> <rdata type="fieldtype">strFBFieldTypeTimeSQL</rdata> <rdata type="databasetype">time</rdata> </rfield>
access: Used by login and password fields, it can only take the values “password” or “login”. The table must have both fields. Usage : <rdata type=”access”>{string login or password}</rdata>
checkbox: (depreciated) Used by the checkbox type to display the field as a checkbox in a form. It Requires the default rdata for the value that will be inserted when the checkbox is checked. Usage: <rdata type=“checkbox”>{boolean 0 or 1}</rdata>
checked_value: Used in checkbox field type to fill in the content of the checkbox field with a value. Usage: <rdata type=”checked_value”>Yes</rdata>
databasetype: Used by the CRUD functionalities when generating SQL queries to manage the data.
datef: Used by the Unix date type to set the format of the date and whether it is hidden or not. <rdata type=“datef”>{date format m, d, Y separated with / or -}:{string for default value (today):{boolean 1 or 0 to hide the field}</rdata>
default: Default value to put in a field. You can display the content of a global variable with the notation [variablename]. You can also call custom functions [functionname;param1;param2…;paramn]. The function is sent one parameter with all the params in an array. The value returned by the function is the value displayed in the field. Usage: <rdata type=“default”>{[global_variable_name] or string}</rdata> Curently there are 2 default functions that can be called: getparam: That will get the default value from a param in a saved event object. Usage: <rdata type=”default”>[getparam;name_of_the_saved_event;name_of_the_param] getfromarray: That will get the default value from an associative array. Usage: <rdata type=”default”>[getfromarray;name_of_the_array;name_of_the_key] See function call for default values
disabled: Will set the field as disabled, the field will not be submited, and the user cannot access its content but it will be visible. See the disabled property for input fields in HTML documention. Usage: <rdata type=”disabled”>1</rdata>
dispalign: Tells how to align the field in a display context, used by reportTable to align the field within the table cell, default alignement is left. (note: not all report templates implement that rdata option) Usage: <rdata type=”dispalign”>right</rdata> will align the field to the right.
email: Used by the Email field type to trigger the event-action to check the email and display it as a mailto link. Usage: <rdata type=“email”>{boolean 0 or 1}</rdata>
emptydefault: Used by the list box to not add a default empty option value in the selection. Usage: <rdata type=”emptydefault”>no</rdata>
execute: Will let the reports and forms execute the PHP code in the database. By default PHP tags are escaped from the database content. If you turn that flag on (1) all PHP code in text and text area fields will be executed. Usage: <rdata type=”execute”>{boolean 0 or 1</rdata>
hidden: Used by all field types. It hides the field in all contexts and displays only an HTML input hidden field. Usage: <rdata type=”hidden”>{boolean 1 or 0}</rdata>
html: Used by the Text Area Type. If it is set to “1”, the text area will display any html code instead of displaying it's content. Usage <rdata type=”html”>1</rdata>
list: Used by the List Box field type. It specifies the table that contains values for the list. Usage: <rdata type=”list”>{table name}:{table field name to display}:{table field name to insert in current field}:{default value}:{ sqlSavedQuery name}</rdata>
listfile: Used by the List File field type. It specifies the directory name and file extension to select. Usage: <rdata type=”listfile”>{directory path}:{file extension}:{default value}</rdata>
listvalues: Used only by the small listbox to store the values of the drop down, this rdata is optional.
Listlabels: Only used by the small listbox to store the label visible in the drop down, if listvalues is not set they will be used for the value of the field.
label: A text label that is displayed next to the form field or display. Usage: <rdata type=”label”>{string with label}</rdata>
numberformat: Format a number field, display float and integer numbers in human readable format. Works like the number_format() function in PHP, plus a prefix string and postfix string. Usage: <rdata type=”numberformat”>pre_string:number_of_digit:decimal_separator:thousand_separator:post_string</rdata> Exemple: <rdata type=”numberformat”>$:1:.:,:-</rdata> will generate for 54134.342: $54,134.3-
ordering: Will be used by reportTable and reportForm to order the fields. The order is descendant. Usage: <rdata type=”ordering”>20</rdata>
overwrite: It is used for the file field, when set to “no” and 2 files with the same name are uploaded in the same folder, the second file will be renamed with the following: n9_original_file_name. Usage: <rdata type=”overwrite”>no</rdata>
picture: Used by File Field type to get the directory where to upload the files. And optionaly the default file name. Usage: <rdata type=”picture”>{directory name}:{default filename}</rdata>
radiobutton: Used By the Radio Button field type to specify the table that contains the content of each radio button. Usage: <rdata type=”radiobutton”>{table name}:{table field name to display}:{table field name to insert in current field}:{default value}</rdata>
radiovalues: Used only by the small radio button to store the values of the radio buttons, this rdata is optional.
radiolabels: Only used by the radio button small to store the label visible of the radio buttons, if radiovalues is not set they will be used for the value of the fields.
readonly: Used by all field types to show the content of the field only in Disp context. Usage: <rdata type=”readonly”>{boolean 1 or 0}</rdata>
required: Used by all field types, it adds the event-action mydb.checkRequired to make sure that the field is not empty. Usage: <rdata type=”required”>{boolean 1 or 0}</rdata>
showpicture: Used by the File field type to specify if html img tags should be displayed for that file. <rdata type=“showpicture”>{boolean 0 or 1}</rdata>
substring: Used in Text line and text area fields to limit the number of characters displayed. To display only the first 50 characters: <rdata type=”substring”>50</rdata>
textarea: Useg by the text area field type for the cols, lines and wrap type. Usage: <rdata type=“textarea”>{cols}:{lines}:{wrap}</rdata>
textline: Used by one line text and all of the field types that extend it: Floats, numbers, and integer numbers. Usage: <rdata type=“textline”>{display size in caracter}:{maximum number of characters for input}</rdata>
vertical: Used by the radio button, to display them one by line or all on one line. Usage: <rdata type=”vertical”>no</rdata> will display them all in one line.