title: "Field Data" post_status: publish comment_status: open taxonomy: category: - elementor-developers-docs post_tag: - Form Fields - Src - Repos


Field Data

Every field has basic information such as the field unique ID and the field label. This data is used in the code and displayed to the user in the editor.

Data Methods

Field data needs to be "returned" by certain methods. These methods are simple:

class Elementor_Test_Field extends \ElementorPro\Modules\Forms\Fields\Field_Base {

    public function get_type(): string {
        return 'field_id';
    }

    public function get_name(): string {
        return esc_html__( 'My Field Label', 'textdomain' );
    }

}