Skip to content

Commit 31bb5d4

Browse files
Update field-data.md (#302)
1 parent 08f723e commit 31bb5d4

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/form-fields/field-data.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ Field data needs to be "returned" by certain methods. These methods are simple:
1111
```php
1212
class Elementor_Test_Field extends \ElementorPro\Modules\Forms\Fields\Field_Base {
1313

14-
public function get_type() {
15-
return 'field_name';
14+
public function get_type(): string {
15+
return 'field_id';
1616
}
1717

18-
public function get_name() {
19-
return esc_html__( 'My Field Name', 'textdomain' );
18+
public function get_name(): string {
19+
return esc_html__( 'My Field Label', 'textdomain' );
2020
}
2121

2222
}

0 commit comments

Comments
 (0)