# Costum Field Types

**URL:** <https://discourse.getcockpit.com/t/costum-field-types/485>\
**Category:** Uncategorized\
**Created:** [January 2, 2019, 1:09am UTC](https://discourse.getcockpit.com/t/costum-field-types/485 "2019-01-02T01:09:05Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![pauloamgomes](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.getcockpit.com/pauloamgomes/32/48_2.png) [@pauloamgomes](https://discourse.getcockpit.com/u/pauloamgomes)\
**Post date:** [January 2, 2019, 9:44am UTC](https://discourse.getcockpit.com/t/costum-field-types/485/2 "2019-01-02T09:44:47Z")

</div>

Creating a custom field is straightforward, you basically need to inform Cockpit of the field:

create the a tag file, e.g. `your-addon/assets/field-yourfieldname.tag`

```auto
<field-yourfieldname>
  field markup...
  <script>
    js code..., you may invoke addon functions, etc..
  </script>
</field-yourfieldname>

```

in `bootstrap.php`:

```auto
$app->on('admin.init', function () {
  $this->helper('admin')->addAssets('youraddonname:assets/field-yourfieldname.tag');
});

```

check in `modules/Cockpit/assets/components` for the existing core fields

---

_[View the full topic](https://discourse.getcockpit.com/t/costum-field-types/485)._
