diff --git a/src/form-fields/field-data.md b/src/form-fields/field-data.md index 214c113..557f7a2 100644 --- a/src/form-fields/field-data.md +++ b/src/form-fields/field-data.md @@ -11,17 +11,17 @@ Field data needs to be "returned" by certain methods. These methods are simple: ```php class Elementor_Test_Field extends \ElementorPro\Modules\Forms\Fields\Field_Base { - public function get_name(): string { + public function get_type() { return 'field_name'; } - public function get_label(): string { + public function get_name() { return esc_html__( 'My Field Name', 'textdomain' ); } } ``` -* **Field Type** – The `get_type()` method returns the field name (id) that will be used in the code. +* **Field Type** – The `get_type()` method returns the field id that will be used in the code. * **Field Name** – The `get_name()` method returns the field label that will be displayed to the user.