Joomla Forms & fields changes: Joomla 3 → 4, 5 and 6

11 issues in this guide

Forms break in two ways: missing JForm / JFormField / JFormRule class aliases on native Joomla 6, and J3 rendering APIs that already died on Joomla 4. This guide groups 11 entries: JEditor, JFactory::getEditor(), JForm, JForm::getControlGroup(), JFormField, $field->save(), JFormFieldCalendar / JFormFieldList / JFormFieldMedia / …, JFormFieldUsergroup, JFormHelper, JFormRule, and 1 more. The replacement pattern is use Joomla\CMS\Form\Form (and FormField, FormRule, FormHelper), render fields through renderField / renderFieldset, and resolve editors from Editor::getInstance() or the container — not JFactory::getEditor(). Custom fields must extend the namespaced FormField and register through FormHelper. UsergrouplistField replaces JFormFieldUsergroup; editor field save() has no 1:1 replacement. Hop mix: 4 at Joomla 3 → 4; 7 at Joomla 5 → 6. Alias removals dominate the J5→J6 hop; control-group and editor save() issues appear as soon as you boot Joomla 4. Catalog replacements in this guide include JEditor → Joomla\CMS\Editor\Editor; JFactory::getEditor() → Editor::getInstance(); JForm → Joomla\CMS\Form\Form; JForm::getControlGroup() → renderField() / renderFieldset(). Open each h2 anchor for the full before/after, fix list, and error strings shipped in the reference data.

JEDITOR-CLASS-001

JEditor

JEditor class name

JEditor is a Joomla 3 global class. Joomla 4 still has an alias. Joomla 5 needs the Behaviour – Backward Compatibility plugin. Native Joomla 6 does not load that alias — you get Class "JEditor" not found.

JEditor → Joomla\CMS\Editor\Editor

Dies at Joomla 5 → 6
Dies at Joomla 5 → 6J3: Works nativelyJ4: Alias (old name still resolves)J6: Removed — fatalBC plugin: covers the class nameMechanical renameJoomla API

What you will see

  • Class "JEditor" not found
  • Class 'JEditor' not found
  • Failed to open stream: JEditor

Symptoms people search

white screen after disabling compatibility plugin · class not found on Joomla 6 · works on Joomla 5 until I turn off backward compatibility

Replace this code

Swap JEditor for Joomla\CMS\Editor\Editor.

Joomla 3

Remove or stop calling this

JEditor::getInstance();
// or new JEditor()

Joomla 4 / 6

Use this instead

use Joomla\CMS\Editor\Editor;

// Call the namespaced class. Do not keep the J prefix.

How to fix it

  1. 1Add a use statement for Joomla\CMS\Editor\Editor.
  2. 2Replace every JEditor with the short class name from that use line.
  3. 3Disable Behaviour – Backward Compatibility on a Joomla 5 staging site. If it fatals, this class is still in the code.

Also known as

JEditor · Joomla\CMS\Editor\Editor · class alias · J prefix

JFACTORY-GETEDITOR-001

JFactory::getEditor()

Factory::getEditor()

Factory no longer vends the editor. Editor::getInstance() does.

JFactory::getEditor() → Editor::getInstance()

Dies at Joomla 3 → 4
Dies at Joomla 3 → 4J3: Works nativelyJ4: Removed — fatalJ6: Removed — fatalBC plugin: no — already dead on J4Patch possible — review itJoomla API

What you will see

  • Call to undefined method Factory::getEditor

Symptoms people search

editor field blank / fatal in admin

Replace this code

Swap JFactory::getEditor() for Editor::getInstance().

Joomla 3

Remove or stop calling this

$editor = JFactory::getEditor();
echo $editor->display('desc', $html, '100%', '300', '60', '20');

Joomla 4 / 6

Use this instead

use Joomla\CMS\Editor\Editor;

$editor = Editor::getInstance($app->get('editor'));

How to fix it

  1. 1Replace getEditor() with Editor::getInstance().

Also known as

JFactory::getEditor()

JFORM-CLASS-001

JForm

JForm class name

JForm is a Joomla 3 global class. Joomla 4 still has an alias. Joomla 5 needs the Behaviour – Backward Compatibility plugin. Native Joomla 6 does not load that alias — you get Class "JForm" not found.

JForm → Joomla\CMS\Form\Form

Dies at Joomla 5 → 6
Dies at Joomla 5 → 6J3: Works nativelyJ4: Alias (old name still resolves)J6: Removed — fatalBC plugin: covers the class nameMechanical renameJoomla API

What you will see

  • Class "JForm" not found
  • Class 'JForm' not found
  • Failed to open stream: JForm

Symptoms people search

white screen after disabling compatibility plugin · class not found on Joomla 6 · works on Joomla 5 until I turn off backward compatibility

Replace this code

Swap JForm for Joomla\CMS\Form\Form.

Joomla 3

Remove or stop calling this

JForm::getInstance();
// or new JForm()

Joomla 4 / 6

Use this instead

use Joomla\CMS\Form\Form;

// Call the namespaced class. Do not keep the J prefix.

How to fix it

  1. 1Add a use statement for Joomla\CMS\Form\Form.
  2. 2Replace every JForm with the short class name from that use line.
  3. 3Disable Behaviour – Backward Compatibility on a Joomla 5 staging site. If it fatals, this class is still in the code.

Also known as

JForm · Joomla\CMS\Form\Form · class alias · J prefix

JFORM-GETCONTROLGROUP-001

JForm::getControlGroup()

JForm::getControlGroup() / getControlGroups()

Control-group renderers were Bootstrap 2 era. Joomla 4 removed them.

JForm::getControlGroup() → renderField() / renderFieldset()

Dies at Joomla 3 → 4
Dies at Joomla 3 → 4J3: Works nativelyJ4: Removed — fatalJ6: Removed — fatalBC plugin: no — already dead on J4Mechanical renameJoomla API

What you will see

  • Call to undefined method ...::getControlGroup
  • Call to undefined method ...::getControlGroups

Symptoms people search

edit form empty · getControlGroup

Replace this code

Swap JForm::getControlGroup() for renderField() / renderFieldset().

Joomla 3

Remove or stop calling this

echo $this->form->getControlGroup('title');
echo $this->form->getControlGroups('details');

Joomla 4 / 6

Use this instead

echo $this->form->renderField('title');
echo $this->form->renderFieldset('details');

How to fix it

  1. 1Replace getControlGroup with renderField.
  2. 2Replace getControlGroups with renderFieldset.

Also known as

getControlGroup · getControlGroups · renderField

JFORMFIELD-CLASS-001

JFormField

JFormField class name

JFormField is a Joomla 3 global class. Joomla 4 still has an alias. Joomla 5 needs the Behaviour – Backward Compatibility plugin. Native Joomla 6 does not load that alias — you get Class "JFormField" not found.

JFormField → Joomla\CMS\Form\FormField

Dies at Joomla 5 → 6
Dies at Joomla 5 → 6J3: Works nativelyJ4: Alias (old name still resolves)J6: Removed — fatalBC plugin: covers the class nameMechanical renameJoomla API

What you will see

  • Class "JFormField" not found
  • Class 'JFormField' not found
  • Failed to open stream: JFormField

Symptoms people search

white screen after disabling compatibility plugin · class not found on Joomla 6 · works on Joomla 5 until I turn off backward compatibility

Replace this code

Swap JFormField for Joomla\CMS\Form\FormField.

Joomla 3

Remove or stop calling this

JFormField::getInstance();
// or new JFormField()

Joomla 4 / 6

Use this instead

use Joomla\CMS\Form\FormField;

// Call the namespaced class. Do not keep the J prefix.

How to fix it

  1. 1Add a use statement for Joomla\CMS\Form\FormField.
  2. 2Replace every JFormField with the short class name from that use line.
  3. 3Disable Behaviour – Backward Compatibility on a Joomla 5 staging site. If it fatals, this class is still in the code.

Also known as

JFormField · Joomla\CMS\Form\FormField · class alias · J prefix

JFORMFIELD-EDITOR-SAVE-001

$field->save()

JFormFieldEditor::save()

Editor field save() was a Joomla 3 leftover. It is gone on Joomla 4.

$field->save() → No replacement — editor fields do not save that way

Dies at Joomla 3 → 4
Dies at Joomla 3 → 4J3: Works nativelyJ4: Removed — fatalJ6: Removed — fatalBC plugin: no — already dead on J4Mechanical renameJoomla API

What you will see

  • Call to undefined method ...::save

Symptoms people search

editor save fatal · JFormFieldEditor

Replace this code

Swap $field->save() for No replacement — editor fields do not save that way.

Joomla 3

Remove or stop calling this

$this->form->getField('articletext')->save();

Joomla 4 / 6

Use this instead

// Removed. The editor value is in the posted form like any other field.

How to fix it

  1. 1Delete the save() call on editor fields.
  2. 2Read the value from Input / the form.

Also known as

JFormFieldEditor::save

JFORMFIELD-STAR-001

JFormFieldCalendar / JFormFieldList / JFormFieldMedia / …

JFormField* subclasses (text, list, calendar, media, editor…)

Every Joomla 3 form field class name is an alias (or gone). Custom fields extend the old JFormFieldX name and die on native Joomla 6. Core types map 1:1 to namespaced *Field classes.

JFormFieldCalendar / JFormFieldList / JFormFieldMedia / … → Joomla\CMS\Form\Field\*Field

Dies at Joomla 5 → 6
Dies at Joomla 5 → 6J3: Works nativelyJ4: Alias (old name still resolves)J6: Removed — fatalBC plugin: covers the class namePatch possible — review itJoomla API

What you will see

  • Class "JFormFieldList" not found
  • Class "JFormFieldCalendar" not found
  • Class "JFormFieldMedia" not found
  • Class "JFormFieldEditor" not found

Symptoms people search

custom form field 500 · JFormFieldList not found

Replace this code

Swap JFormFieldCalendar / JFormFieldList / JFormFieldMedia / … for Joomla\CMS\Form\Field\*Field.

Joomla 3

Remove or stop calling this

class JFormFieldLmsCourse extends JFormFieldList {}

Joomla 4 / 6

Use this instead

use Joomla\CMS\Form\Field\ListField;
class LmsCourseField extends ListField {}

How to fix it

  1. 1Extend the namespaced Field class (ListField, TextField, CalendarField, MediaField, EditorField, UserField, …).
  2. 2Register the field in the form XML with type="lmscourse" and a namespace, or addfieldpath + new class name.
  3. 3JFormFieldUsergroup is gone — use UsergrouplistField.

Also known as

JFormFieldText · JFormFieldTextarea · JFormFieldList · JFormFieldGroupedlist · JFormFieldRadio · JFormFieldCheckbox · JFormFieldCheckboxes · JFormFieldHidden · JFormFieldPassword · JFormFieldEmail · JFormFieldTel · JFormFieldUrl · JFormFieldNumber · JFormFieldInteger · JFormFieldRange · JFormFieldColor · JFormFieldCalendar · JFormFieldEditor · JFormFieldMedia · JFormFieldFile · JFormFieldUser · JFormFieldCategory · JFormFieldAccesslevel · JFormFieldLanguage · JFormFieldMenu · JFormFieldMenuitem · JFormFieldModulePosition · JFormFieldModuleOrder · JFormFieldSql · JFormFieldRules · JFormFieldSpacer · JFormFieldNote · JFormFieldTag · JFormFieldCaptcha · JFormFieldFilelist · JFormFieldFolderlist · JFormFieldImagelist · JFormFieldPlugins · JFormFieldContentlanguage · JFormFieldContenttype · JFormFieldTimezone · JFormFieldHelpsite · JFormFieldComponentlayout · JFormFieldModulelayout · JFormFieldChromeStyle · JFormFieldContentHistory · JFormFieldFrontendlanguage · JFormFieldHeadertag · TextField · ListField · CalendarField · MediaField · EditorField

JFORMFIELD-USERGROUP-001

JFormFieldUsergroup

JFormFieldUsergroup

The usergroup field type was replaced by usergrouplist in Joomla 4.

JFormFieldUsergroup → UsergrouplistField

Dies at Joomla 3 → 4
Dies at Joomla 3 → 4J3: Works nativelyJ4: Removed — fatalJ6: Removed — fatalBC plugin: no — already dead on J4Patch possible — review itJoomla API

What you will see

  • Class "JFormFieldUsergroup" not found

Symptoms people search

usergroup field missing

Replace this code

Swap JFormFieldUsergroup for UsergrouplistField.

Joomla 3

Remove or stop calling this

<field name="groups" type="usergroup" />

Joomla 4 / 6

Use this instead

<field name="groups" type="usergrouplist" />

How to fix it

  1. 1Change XML type to usergrouplist.
  2. 2Rename custom field subclasses.

Also known as

usergroup · usergrouplist

JFORMHELPER-CLASS-001

JFormHelper

JFormHelper class name

JFormHelper is a Joomla 3 global class. Joomla 4 still has an alias. Joomla 5 needs the Behaviour – Backward Compatibility plugin. Native Joomla 6 does not load that alias — you get Class "JFormHelper" not found.

JFormHelper → Joomla\CMS\Form\FormHelper

Dies at Joomla 5 → 6
Dies at Joomla 5 → 6J3: Works nativelyJ4: Alias (old name still resolves)J6: Removed — fatalBC plugin: covers the class nameMechanical renameJoomla API

What you will see

  • Class "JFormHelper" not found
  • Class 'JFormHelper' not found
  • Failed to open stream: JFormHelper

Symptoms people search

white screen after disabling compatibility plugin · class not found on Joomla 6 · works on Joomla 5 until I turn off backward compatibility

Replace this code

Swap JFormHelper for Joomla\CMS\Form\FormHelper.

Joomla 3

Remove or stop calling this

JFormHelper::getInstance();
// or new JFormHelper()

Joomla 4 / 6

Use this instead

use Joomla\CMS\Form\FormHelper;

// Call the namespaced class. Do not keep the J prefix.

How to fix it

  1. 1Add a use statement for Joomla\CMS\Form\FormHelper.
  2. 2Replace every JFormHelper with the short class name from that use line.
  3. 3Disable Behaviour – Backward Compatibility on a Joomla 5 staging site. If it fatals, this class is still in the code.

Also known as

JFormHelper · Joomla\CMS\Form\FormHelper · class alias · J prefix

JFORMRULE-CLASS-001

JFormRule

JFormRule class name

JFormRule is a Joomla 3 global class. Joomla 4 still has an alias. Joomla 5 needs the Behaviour – Backward Compatibility plugin. Native Joomla 6 does not load that alias — you get Class "JFormRule" not found.

JFormRule → Joomla\CMS\Form\FormRule

Dies at Joomla 5 → 6
Dies at Joomla 5 → 6J3: Works nativelyJ4: Alias (old name still resolves)J6: Removed — fatalBC plugin: covers the class nameMechanical renameJoomla API

What you will see

  • Class "JFormRule" not found
  • Class 'JFormRule' not found
  • Failed to open stream: JFormRule

Symptoms people search

white screen after disabling compatibility plugin · class not found on Joomla 6 · works on Joomla 5 until I turn off backward compatibility

Replace this code

Swap JFormRule for Joomla\CMS\Form\FormRule.

Joomla 3

Remove or stop calling this

JFormRule::getInstance();
// or new JFormRule()

Joomla 4 / 6

Use this instead

use Joomla\CMS\Form\FormRule;

// Call the namespaced class. Do not keep the J prefix.

How to fix it

  1. 1Add a use statement for Joomla\CMS\Form\FormRule.
  2. 2Replace every JFormRule with the short class name from that use line.
  3. 3Disable Behaviour – Backward Compatibility on a Joomla 5 staging site. If it fatals, this class is still in the code.

Also known as

JFormRule · Joomla\CMS\Form\FormRule · class alias · J prefix

JFORMRULE-STAR-001

JFormRuleEmail / JFormRuleUrl / JFormRuleEquals / …

JFormRule* validators

Form validation rule class names followed JFormRuleX. Native Joomla 6 uses namespaced Rule classes. Custom rules that extend the J3 name fail when the alias plugin is off.

JFormRuleEmail / JFormRuleUrl / JFormRuleEquals / … → Joomla\CMS\Form\Rule\*Rule

Dies at Joomla 5 → 6
Dies at Joomla 5 → 6J3: Works nativelyJ4: Alias (old name still resolves)J6: Removed — fatalBC plugin: covers the class namePatch possible — review itJoomla API

What you will see

  • Class "JFormRuleEmail" not found
  • Class "JFormRuleUrl" not found
  • Class "JFormRuleEquals" not found

Symptoms people search

form validation class not found · JFormRule

Replace this code

Swap JFormRuleEmail / JFormRuleUrl / JFormRuleEquals / … for Joomla\CMS\Form\Rule\*Rule.

Joomla 3

Remove or stop calling this

class JFormRuleLmsSku extends JFormRule {}

Joomla 4 / 6

Use this instead

use Joomla\CMS\Form\FormRule;
class LmsSkuRule extends FormRule {
    public function test(\SimpleXMLElement $element, $value, $group = null, ?\Joomla\Registry\Registry $input = null, ?\Joomla\CMS\Form\Form $form = null): bool { return true; }
}

How to fix it

  1. 1Extend FormRule or the specific *Rule.
  2. 2Point the XML validate="lmssku" at the namespaced class.

Also known as

JFormRuleBoolean · JFormRuleCalendar · JFormRuleColor · JFormRuleEmail · JFormRuleEquals · JFormRuleNotequals · JFormRuleNumber · JFormRuleOptions · JFormRuleRules · JFormRuleTel · JFormRuleUrl · JFormRuleUsername · EmailRule · UrlRule · EqualsRule

Start a project

Have something
to build?

Tell us what you are building. You will hear back from an engineer within one business day.

hello@infyways.com · Remote, working across time zones

Tell us about your project

Fill out the quick form and we'll reach out.