Field types

These are the build-in field types you can choose when creating a new field. Plug-ins may have additional field types that are not documented here.

Some of these field types have attributes, which you can use to further limit the data the field can hold. If you do not want to limit the data, you can leave the attributes blank and they will not be used.

The build-in field types

Field Type Notes Attributes
String a piece of text of variable length. It could be as short as a name, or a few characters, or as long as a document. A string has no formatting options, limit the contents of the field to a few choices. These choices are specified by a list of options, separated by comma. For example, traffic light states, are "Red, Yellow, Green". The user can select from a drop-down with those options.
Integer a whole number, positive or negative max and min, upper and lower bounds (inclusive) for the value. For a value which can only be zero or positive, set min to 0 and leave max blank. For example, if you are representing people in a table you may want to specify that the Age field is an integer that cannot be less than zero.
Bool a Boolean value, that is a value that can be true or false. (Note that if the field is not required, it can also be missing.)  
Date a point in time including both day and time of day  
Float a floating-point number. For example, the numbers 5.5, 0.001, and -2,345.6789 are floating point numbers
  • units, a text string for the units of measure, for example Kg, miles, Gb
  • decimal_places, the number of decimal places to use in input and output.
  • max and min, upper and lower bounds (inclusive) for the value
Color a colour value in RGB colour space. Stored internally as a hexadecimal number, e.g. "#00ff88"  
HTML    
Key to {table} a reference to a different table. For example, indicating that this row belongs to a row in a different table.

the summary field, the field in the referred table to use for input and output.

For fields that are a key to a different table, you may be asked to pick the summary field. This is the field in the table that is being referenced that will be used as a proxy for the user to pick values for the reference. Internally, references are stored by a row number, but for instance if the user is picking a row in the Employee table to be assigned as an Account Manager for a row in the Customer table, you would want the user to pick the account manager not by an row identifier number, but by the employee's name instead. So you might choose name in the employee table to be the summary field.

Key to users a reference to a user with a Saltcorn account in the current installation. Fields that are Key to Users or File in a way also act like key fields in that they are stored internally as an identifier. However the summary fields (email and file name, respectively) are not changeable. File fields do have one other option to choose which is the access role required to read files that are uploaded by users into this field.  
File a reference to a file, such as an image, a pdf, a Word document minimum user role which is required to download files uploaded using forms for this table