Field Data Type: String
This explains String Fields. For an overview check out Understanding Data....
String data is a basic data type and is very commonly used in many fields. It's used for any basic kind of text, be it a character, a single-line text or wysiwyg-content.
Features
The basic string field doesn't have any features, since all the features are in the sub-types.
Sub-Types of String Fields
- string-default - simple one or multi-line inputs
- drop-down for simple dropdowns
- drop-down-query for dropdowns which retrieve the data from a server
- wysiwyg
- font-icon-picker
- url-path
Shared Settings
All string field types currently don't have shared settings.
Technical Information
Storage in the SQL Database in the EAV-Model
This is simply stored as a string in the DB.
Storage in the SQL Database in the JSON-Model
This is simply stored as a JSON string.
Null Value Possible
In some cases you may add a field to a type which already has Entities created previously. In this case the old data doesn't have a value for the field.
If this happens, the field will return null
, so you may need to catch this special exception in your code.
Read also
History
- Introduced in EAV 1.0 / 2sxc 1.0
- Changed in EAV 3.0 / 2sxc 6.0 (it used to have many configuration fields for all kinds of uses, which were then moved to sub-types)
- Enhanced in 12.02 to show old, invisible configuration which may still have an effect and allow copy/purge