Skip to main content

Create a field

A field stores one piece of structured data in a FLEXIcontent item. This guide covers creating a normal custom field in FLEXIcontent 5.x, assigning it to content types, and making it available in the item form and on the frontend.

:::info Source Based on FLEXIcontent 5.5 (master, commit 5bc85a46712b32fae5845a134d48083f71a55419), mainly admin/models/forms/field.xml, admin/models/field.php, admin/views/field/tmpl/default.php, admin/tables/flexicontent_fields.php and admin/controllers/fields.php. :::

Before you start​

  • Enable the field type plugin you need in System → Manage → Plugins (flexicontent_fields group).
  • Create at least one content type in Components → FLEXIcontent → Content types (guide).
  • Your Joomla account needs permission to add fields (CanAddField) and, for the Permissions tab, to configure field ACL.
tip

Before creating a new field, check whether an existing field with a custom layout can do the job. Many presentation needs do not require a new field.

1. Open the field manager​

Go to Components → FLEXIcontent → Fields and click New. The form title is New field.

The direct URL is:

index.php?option=com_flexicontent&view=fields

2. Fill in the header​

The top of the form contains the three essential settings.

SettingRequiredNotes
LabelYesText shown in the item form. Can be a Joomla language key.
NameNoMachine name used in templates, modules and the database. If empty or invalid, FLEXIcontent derives it from the label.
Field typeNoDefaults to text. The list contains the enabled flexicontent_fields plugins.

Name rules​

  • Allowed characters: ASCII letters, digits, _ and - (/^[a-z_0-9-]+$/i).
  • Invalid or empty names are automatically corrected from the label; FLEXIcontent shows a warning.
  • Duplicate names receive a suffix -2, -3, etc.
  • Avoid reusing the 14 built-in core names: text, created, created_by, modified, modified_by, title, hits, document_type, version, state, voting, favourites, categories, tags.
warning

Choose the name carefully. Renaming a field later breaks templates, modules or custom code that reference the old name.

When you change the field type, click Apply & Reload to load the type-specific parameters. A new unsaved field shows the message “Please apply to see this field specific parameters!!!”.

3. Basic tab​

OptionDefaultPurpose
Published1An unpublished field is not loaded in the item form.
Access1 (Public)Joomla view level. Restricts frontend visibility.
Ordering999General ordering. The order inside the item form is defined per content type.
TypesnoneContent types that may use this field. Stored in #__flexicontent_fields_type_relations.

Select at least one content type in Types. The field is loaded only for items whose type is assigned here.

4. Item form tab​

These options control how the field behaves while editing an item:

OptionPurpose
DescriptionHelp text displayed in the item form.
Label for form (label_form)Different label for the editing form. Can be a language key.
UntranslatableDisables translation of the field value.
Form hidden (formhidden)0 No, 1 Frontend, 2 Backend, 3 Both, 4 If empty.
Values editableRestricts who may edit existing values.
Edit helpControls the help/information display in the form.

Some rows are hidden when the selected field type does not support them. There is no general category-assignment tab in the field form; category scoping comes from the template/layout and from field-type options such as catids or rootcatid.

5. Search, filtering tab​

OptionPurpose
Basic index — issearch, isfilterInclude the field in basic search and list filters.
Advanced index — isadvsearch, isadvfilterInclude the field in advanced search and filters.
Rebuild Search IndexRebuild the index when FLEXIcontent reports it as dirty.

6. Field type configuration​

The right tabset is generated from the selected plugin's XML manifest. The tabs and options differ by type; typical groups are Editing, Viewing, SEO and Filtering.

Common options include:

OptionPurpose
requiredMakes the value mandatory in the item form.
allow_multiple, max_valuesAllows and limits multiple values.
default_value, default_value_usePre-fills a value: 0 new items, 1 every edit, 2 also show when empty.
showonShows the field conditionally, depending on another field.
use_ingroupIncludes the field in a repeatable field group.
Values layout (viewlayout)Chooses the field output layout.

The field reference pages list the complete options for each type.

7. Permissions tab​

Available to users who can configure field ACL. Joomla permissions are stored on the asset com_flexicontent.field.<id>. The field's Access level and these rules both limit who can see or edit the value.

8. Save the field​

The toolbar offers Apply, Apply & Reload, Save, Save & New, Save as Copy (non-core fields only) and Cancel. A successful save shows Field saved.

At this point the field exists, but it is not yet necessarily visible in the item form or on the frontend.

9. Place the field in the item form​

  1. Return to Components → FLEXIcontent → Fields.
  2. Filter the list by the relevant content type.
  3. Use the ordering controls to position the field in that type's form.

The order is stored per content type in #__flexicontent_fields_type_relations.ordering.

To structure the form, add structural field types:

  • custom_form_html — tabset and fieldset markers, custom HTML.
  • fieldgroup — repeatable groups of fields.
  • coreprops — places built-in core properties such as alias, category, access, metadata or perms in the form.

coreprops does not create a new value; it only positions an existing core property.

10. Display the field on the frontend​

Field assignment and form ordering do not make a field visible on the site. The frontend uses template positions:

  1. Go to the FLEXIcontent Template manager.
  2. Edit the item layout or the category layout used by your content type/category.
  3. Drag the field into a position.
  4. Save the template.

See Field positions and drag and drop.

Two common symptoms follow from this separation:

SymptomCheck
The field is absent from the item formPublished, assigned to the type, access level, field type support.
The field is filled in but not displayedThe field must also be in the active item/category template position.

Available field types​

field_type is the name of an enabled flexicontent_fields plugin.

FamilyPlugin namesDocumentation
Selectionradio, radioimage, checkbox, checkboximage, select, selectmultipleRadio, Select, Checkbox
Single propertycolor, date, text, textarea, textselectText, Textarea, Date
Multi propertyweblink, email, phonenumbers, termlistEmail, Phone
Mediafile, image, mediafile, sharedmedia, addressintImage, File, Address
Form structuresubform, fieldgroup, account_via_submit, custom_form_html, corepropsSubform, Field group
Display helperstoolbar, fcloadmodule, fcpagenav, linkslist, authoritems, jprofile, commentsToolbar, Load module
Relationsrelation, relation_reverse, autorelationfiltersRelation, Reverse relation

The core plugin powers the built-in fields and is hidden from the normal selector.

If none of these types stores or processes the data you need, write a new field type plugin.

Core fields vs custom fields​

FLEXIcontent installs 14 core fields: text, created, created_by, modified, modified_by, title, hits, document_type, version, state, voting, favourites, categories, tags.

  • New fields always have iscore = 0; you cannot create a core field.
  • Core field names are read-only.
  • Core fields with ids 1–6 cannot be unpublished or deleted.
  • Core fields with ids below 15 cannot be copied.
  • Core fields are automatically assigned to all content types, except voting and favourites.

Use coreprops when you only need to place an existing core property in the item form.

FLEXIcontent fields are not Joomla custom fields​

FLEXIcontent fieldJoomla com_fields custom field
Storage#__flexicontent_fields, values in field item relations.#__fields, #__fields_values.
Field typesflexicontent_fields plugins.Joomla field plugins.
AssignmentFLEXIcontent content types.Joomla components/categories.
Form orderPer FLEXIcontent content type.Joomla field groups.
Frontend displayFLEXIcontent template positions.Joomla component layout overrides.

Troubleshooting​

ProblemLikely cause
Type-specific options are emptyClick Apply & Reload after choosing the field type.
Duplicate field nameFLEXIcontent appends -2; consider choosing a clearer name.
Field name changed by the systemThe original name was invalid; templates and modules must be updated.
Search/filter does not return resultsIndex is dirty; use Rebuild Search Index.
Form looks broken after adding markersUnmatched custom_form_html tab/fieldset markers.
Cannot delete or unpublish a fieldCore field restriction.
Access level reset to PublicSaved level was invalid for this field.

Official references​