Přejít k obsahu  Přejít k hlavnímu menu

Blog / Knowledge base

Updated: 25. May 2020

Merging values ​​from multiple inputs into one

Mailocator allows you to serialize the data submitted from the form into a single field before submitting, which is useful, for example, when submitting a date.


Case study:
Merge month and year into one field and send it to ESP

See how easy it is to merge values ​​from two selections - month and year - into one field and send this field to a third-party tool (newsletter subscription).

Create the necessary select tags and add the necessary options, for example:
<select name="year">
    <option value="1999">1999</option>
    <option value="2019">2019</option>
    <option value="2029">2029</option>
</select>

<select name="mon">
    <option value="jan">jan</option>
    <option value="feb">feb</option>
</select>







Add a hidden input that will contain the combined value of the month and year.

Name the input according to the name of the custom field in your tool and add the prefix opt_, for example opt_date
Add the data-merge attribute and enter the names from the selections for month and year year | mon separated by a value |
Add a class to the input mlctr-ext-merge

<input type="hidden" name="opt_date" data-merge="year|mon" class="mlctr-ext-merge"/>





You can merge any number of values.
For this feature, turn on the Mailocator Extension in the version settings.

RELATED

Launch a campaign when you hover or touch a specific location on the page

Mark a location that triggers a campaign when the user hovers over it or touches it on a touch device

Mailocator Events

With events, you can intelligently manage the sequence of campaigns across the entire workflow scenario and display much more relevant and precisely targeted content in real time.

Notification

Set up the display of notifications on your site using Mailocator

Processing of the form (campaign) inserted into the page

How to send data to Mailocator from a form located on your site?

Instructions for your own design of the wheel of fortune

How to create a wheel of fortune with your own HTML and CSS code