How to generate unique reference no for hidden field in form?
-
I am using contact form 7 to make a simple form submission. User will enter their details and submit the form and they will receive a submission email after that. However, I want to add a hidden input field like
'your-ref-no'
and generate a unique reference no to keep track of each submission. Currently, below is the form I have created:`[hidden your-ref-no]</p>
<p>[text* your-name]</p>
<p>Name *</p>
<p>[tel* your-mobile-number]</p>
<p>Mobile Number (+65) *</p>
<p>[email* your-email-address]</p>
<p>Email Address *</p>
<p>[text social-media-link]</p>
<p>Social Media Link (Facebook, Tiktok, Instagram or X post link) *</p>
<p>………</p>
I want to generate a unique ref no (like maybe in this format #TF-123456789 where the numbers are randomly generated with a mixed of letters) and when user receive the email, they will see this reference no as well and in my dashboard submission forms where i can view the list of submission details which include this ref no.
How would I do this?
- You must be logged in to reply to this topic.