Mailocator
menu

2. November 2021

Automated values, adding values to hidden inputs

Merging of arbitrary fields and automatic filling of selected fields with a series of system values

 
Merge entered values into one field, automatically add date, time, user device identification and other values


   

Automated values

Values can be added to any hidden input where the value contains a mask [* *]

<input type="hidden" name="opt_year" value="[*YYYY*]">

<input type="hidden" name="opt_year" value="[* YYYY *]">
<input type="hidden" name="opt_year" value="year[* YYYY *]">



 

Merging values

Example: merge first and last name into one field



In your form (pop-up) you have two fields in which the user enters the first and last name separately
<input type="text" name="opt_first-name" value="" placeholder="first name">
<input type="text" name="opt_surname" value="" placeholder="surname">


To merge first and last names, create a hidden input named by custom convention with the following value
<input type="hidden" name="opt_name" value="[*opt_first-name opt_surname*]">





Addition of values

Example: adding a form submission date



To complete the date, you can use the usual mask for day DD, for month MM and for year YYYY (or just YY).
you can use a space, dash or any other custom separator as a date separator
the composition of values (data format) is arbitrary

Example:
<input type="hidden" name="opt_send-date" value="[*DD-MM-YYYY*]">

Example for UNIX Timestamp:
<input type="hidden" name="opt_send-date" value="[*TIMESTAMP*]">

Example: adding a user's IP address



You can also add the IP (IPv4) address of the device from which the form (pop-up) was sent:

Example:
<input type="hidden" name="opt_ip-address" value="[*IP*]">

Example: adding a region



The ISO code of the user's country and continent can also be added:

Example:
<input type="hidden" name="opt_country" value="[*COUNTRY*]">
<input type="hidden" name="opt_region" value="[*CONTINENT*]">

Example: adding user device information



You can also provide identification of the browser and device from which the form was submitted:

Example:
<input type="hidden" name="opt_mobile-or-desktop" value="[*DEVICE*]">
<input type="hidden" name="opt_browser" value="[*AGENT*]">


HAS THIS ARTICLE HELPED YOU?

  

Mailnatives, s.r.o. with IČO 07891768 is registered at the Regional Court in Hradec Králové under the file number C 43368