Hello, I’m poking around at creating a custom field. For starters I’m extending the text field. I’ve just instructed Kirby to extend the field, nothing more so I’d expect the custom field to act and look just like a standard text field, but it renders with just a line.
Here’s my plugin index.php…
<?php
Kirby::plugin('twp/myfield', [
'fields' => [
'myfield' => [
'extends' => 'text'
]
]
]);
Here’s my index.js
panel.plugin("twp/myfield", {
fields: {
myfield: {
extends: "k-text-field"
}
}
});
So why not just render like a standard text field. After I understand this I’ll move onto how I might be able to add a default value to this custom field but baby steps.