If you want to receive, in lead details (sent through the email integration or any form integration), the date and time when the lead has filled out the form on your landing page, add a hidden field to the form. Then choose one of the two JavaScript codes, depending on the format in which you want to receive the information: detailed, i.e. Mon Jul 01 2021 12:00:00 GMT+0200 (Central European Summer Time), or date and time only, i.e. 01.01.2021, 12:00:00.
Remember:
- You can always check the date and time of form submission in the Leads tab on the platform.
- The date and time of form submission correspond to your account’s time zone settings.
Add a hidden field
1. Log in to your Landingi account and go to the editor of your landing page.
2. Navigate to Form settings. Click Add element (1) and select Hidden field (2). Then Save & close.
3. Publish the landing page and open it.
4. Find and copy the hidden field ID number. This guide will show you how to find it.
Add JavaScript code
Choose format of the date:
Detailed date
Format: Mon Jul 01 2021 12:00:00 GMT+0200 (Central European Summer Time)
1. Navigate to the JavaScript Code tab.
2. Click Add new script.
3. Copy the code indicated below. Change FIELDID to the copied hidden field ID number.
<script>
document.getElementById('FIELDID').value = Date();
</script>
4. Name (1) the script and choose the Body bottom (2) position on the Main page (3). Paste the code (4) in the content field. Save by clicking Add script.
Date and time only
Format: 01.01.2021, 12:00:00
1. Navigate to the JavaScript Code tab.
2. Click Add new script.
3. Copy the code indicated below. Change FIELDID to the copied hidden field ID number.
<script>
var d = new Date();
var n = d.toLocaleString();
document.getElementById('FIELDID').value = n;
</script>
4. Name (1) the script and choose the Body bottom (2) position on the Main page (3). Paste the code (4) in the content field. Save by clicking Add script.
Integrate your form
1. Go back to your landing page editor and open the form Settings.
2. Set up the email integration or one of the integrations with external tools.
3. Remember to connect form fields with relevant fields in the external system.
4. Publish your landing page.
5. Go to your landing page, fill out the form, and check if the date has been added to lead details sent through the integration.