# Unique ticket number per completed form in the notify me mail

**URL:** https://community.elfsight.com/t/unique-ticket-number-per-completed-form-in-the-notify-me-mail/68115
**Category:** Customization
**Tags:** form-builder
**Created:** [August 29, 2024, 3:28pm UTC](https://community.elfsight.com/t/unique-ticket-number-per-completed-form-in-the-notify-me-mail/68115 "2024-08-29T15:28:22Z")
**Posts on this page:** 1
**Showing post:** 8

<div class="post-metadata">

### Author: ![Max](https://sea2.discourse-cdn.com/flex020/user_avatar/community.elfsight.com/max/32/710_2.png) [@Max](https://community.elfsight.com/u/Max)
#### Post date: [August 30, 2024, 12:40pm UTC](https://community.elfsight.com/t/unique-ticket-number-per-completed-form-in-the-notify-me-mail/68115/8 "2024-08-30T12:40:41Z")

</div>

The workaround with the date is possible using the Hidden field option.

> **Add the Hidden field to your form**
>
> ![image](https://us1.discourse-cdn.com/flex020/uploads/elfsight/original/3X/6/f/6fe55d847e9ceda848b5c4088a3f5e5e6aceaaf7.png)

  

> **Copy the ID of the Hidden field and add it to the Subject field in the Notify Me section**
>
> ![image](https://us1.discourse-cdn.com/flex020/uploads/elfsight/original/3X/c/b/cb11ae983ae56af99bd9adda0a5978d547b47ac6.png)
> 
> ![image](https://us1.discourse-cdn.com/flex020/uploads/elfsight/original/3X/b/c/bc0c4d90bc74fad886b25a88e46d7b12e323a158.png)

  

> **Adding the code to the Custom JS**
>
> Add the code below to the Custom JS section on the Settings tab:
> 
> ```auto
> function formatDateTime() {
> const now = new Date();
>     
> const day = String(now.getDate()).padStart(2, '0');
> const month = String(now.getMonth() + 1).padStart(2, '0');
> const year = String(now.getFullYear()).slice(-2);
> const minutes = String(now.getMinutes()).padStart(2, '0');
> const seconds = String(now.getSeconds()).padStart(2, '0');
> 
> return `[${day}${month}${year}${minutes}${seconds}]`;
> }
> 
> const date = formatDateTime();
> widget.setFieldValue('[current-date]', date)
> 
> ```
> 
>   
> 
> Replace `current-date` in the last line of the code with the actual ID of your Hidden field

  

Please check it out and let me know if you like the result 🙂

---

_[View the full topic](https://community.elfsight.com/t/unique-ticket-number-per-completed-form-in-the-notify-me-mail/68115)._
