Log in
Model

Element

Magento\Eav\Model\Form\Element

What it does

This class represents a form element in Magento 2's EAV system, linking attributes to form types and fieldsets.

Developers use this model when programmatically managing which EAV attributes appear in forms (like customer registration or product forms), controlling their order and grouping.

It validates that both a form type and attribute are set before saving, and provides easy access to the associated EAV attribute instance.

Public Methods

  • beforeSave()
  • getAttribute()