# Custom field: contact created date

**URL:** <https://forum.mautic.org/t/custom-field-contact-created-date/11677>\
**Category:** Product Support\
**Created:** [November 15, 2019, 1:39pm UTC](https://forum.mautic.org/t/custom-field-contact-created-date/11677 "2019-11-15T13:39:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![simas](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/simas/32/724_2.png) [@simas](https://forum.mautic.org/u/simas)\
**Post date:** [November 15, 2019, 1:39pm UTC](https://forum.mautic.org/t/custom-field-contact-created-date/11677/1 "2019-11-15T13:39:03Z")

</div>

Hello,

I want to create a custom field with the contact creation date filled in. Is there a way to do so?

Thank you 🙂

---

<div class="post-metadata">

**Author:** ![MxyzptlkFishStix](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/mxyzptlkfishstix/32/1132_2.png) [@MxyzptlkFishStix](https://forum.mautic.org/u/MxyzptlkFishStix)\
**Post date:** [November 15, 2019, 2:55pm UTC](https://forum.mautic.org/t/custom-field-contact-created-date/11677/2 "2019-11-15T14:55:14Z")

</div>

Add a hidden field on your form in Mautic.

Give it a name in the `Label` textarea.

Insert `<?php echo date('d-m-Y H:i:s'); ?>` which outputs the date (example: 15-11-2019 09:58:11)

or

`<?php time(); ?>` which outputs a Unix timestamp (example: 1573829833)

in the `Default value` textarea.

---

<div class="post-metadata">

**Author:** ![atlantis](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/atlantis/32/452_2.png) [@atlantis](https://forum.mautic.org/u/atlantis)\
**Post date:** [May 14, 2020, 1:14pm UTC](https://forum.mautic.org/t/custom-field-contact-created-date/11677/3 "2020-05-14T13:14:08Z")

</div>

> [@MxyzptlkFishStix](#):
>
> `Default value`

It doesnt work with Mautic 2.16. Any other idea?  
When saving and opening the hidden field, the `default value` is empty. It seems, that Mautic removes the PHP code.
