# 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:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![fschuermeyer](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.getcockpit.com/fschuermeyer/32/216_2.png) [@fschuermeyer](https://discourse.getcockpit.com/u/fschuermeyer)\
**Post date:** [January 2, 2019, 1:09am UTC](https://discourse.getcockpit.com/t/costum-field-types/485/1 "2019-01-02T01:09:05Z")

</div>

Hello,

how can i create Costum Fields, have you any Documentation?

I will Create a Field for Search in UnsplashAPI and Put the Image ID in a Field.

Have you any tips for me?

---

<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

---

<div class="post-metadata">

**Author:** ![artur](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.getcockpit.com/artur/32/4_2.png) [@artur](https://discourse.getcockpit.com/u/artur)\
**Post date:** [January 2, 2019, 4:19pm UTC](https://discourse.getcockpit.com/t/costum-field-types/485/3 "2019-01-02T16:19:10Z")

</div>

you can also just put `field-yourfieldname.tag` into `config/tags` folder and it will get aut-loaded (good for quick testing)
