Is there a way to set the value of results sent to our CRM? For example, if the field to the consumer shows “Purchase” the result would get sent as a 1?
Hi Daniel - thanks for posting!
In order for for results to be sent through to your CRM using pre-set values like you have described, the values will need to be connected to a drop down menu option in your form.
To do this, you will first need to set up a WebHook for your given landing page to have your lead data be sent to your CRM. This is a link to our Unbounce Answers article which speaks on how a WebHook works for an Unbounce page and the bit of development required from you end in order to achieve this:
http://support.unbounce.com/entries/3…
Once the WebHook is setup, you can use the snippet of code (provided by our development team) that I’ve included below to achieve the pre-set value functionality for your page:
In the example code, you would just need to replace the ‘#gender’ with the given name of your drop down menu. In order to do so and try out this code, you will want to use a type of web inspector to determine what the option values are in the drop down menu after the page is loaded. The reason for this is because the full HTML of each landing page is not generated until the page has been published from the Unbounce system.
Please feel free to move ahead with trying this out with your page. If you are experiencing issues with the process, please don’t hesitate to let us know and I will be able to investigate further.
Be sure to let me know if you have any further questions or suggestions for how we could improve our customer support here at Unbounce.
All the best,
Jacquelyn | Unbounce Customer Success
Here is my code to change value posted to my CRM.
My need was to translate the country field value: my CRM is not waiting for France but is waiting for fr.
The idea is to have the standard Country drop/down menu of unbounce displayed to users of my landing page.
Then I include the following java script in my landing page.
This java script automatically translates the country code in a hidden field named “hidden_country” and added in my form.
After that in webhook, I can post “?my_CRM_country_variable=(hidden_country)” and my CRM is happy!
This method can be used to translate other fields in a form.
Thanks to Paul Kirchoff and his vForm() code that I have reused to code this feature ( https://getsatisfaction.com/unbounce/… ).
// translate country table var translate_country = { "Afghanistan" : "af", "Albania" : "al", "Algeria" : "dz", "Andorra" : "ad", "Angola" : "al", "Antarctica" : "aq", "Antigua and Barbuda" : "ag", "Argentina" : "ar", "Armenia" : "am", "Australia" : "au", "Austria" : "at", "Azerbaijan" : "az", "Bahamas" : "bs", "Bahrain" : "bh", "Bangladesh" : "bd", "Barbados" : "bb", "Belarus" : "by", "Belgium" : "be", "Belize" : "bz", "Benin" : "bj", "Bermuda" : "bm", "Bhutan" : "bt", "Bolivia" : "bo", "Bosnia and Herzegovina" : "ba", "Botswana" : "bw", "Brazil" : "br", "Brunei" : "bn", "Bulgaria" : "bg", "Burkina Faso" : "bf", "Burma" : "mm", "Burundi" : "bi", "Cambodia" : "kh", "Cameroon" : "cm", "Canada" : "ca", "Cape Verde" : "cv", "Central African Republic" : "cf", "Chad" : "td", "Chile" : "cl", "China" : "cn", "Colombia" : "co", "Comoros" : "km", "Congo : Democratic Republic" : "cd", "Congo : Republic of the" : "cg", "Costa Rica" : "cr", "Cote d'Ivoire" : "ci", "Croatia" : "hr", "Cuba" : "cu", "Cyprus" : "cy", "Czech Republic" : "cz", "Denmark" : "dk", "Djibouti" : "dj", "Dominica" : "dm", "Dominican Republic" : "do", "East Timor" : "tl", "Ecuador" : "ec", "Egypt" : "eg", "El Salvador" : "sv", "Equatorial Guinea" : "gq", "Eritrea" : "er", "Estonia" : "ee", "Ethiopia" : "et", "Fiji" : "fj", "Finland" : "fi", "France" : "fr", "Gabon" : "ga", "Gambia" : "gm", "Georgia" : "ge", "Germany" : "de", "Ghana" : "gh", "Greece" : "gr", "Greenland" : "gl", "Grenada" : "gd", "Guatemala" : "gt", "Guinea" : "gn", "Guinea-Bissau" : "gw", "Guyana" : "gy", "Haiti" : "ht", "Honduras" : "hn", "Hong Kong" : "hk", "Hungary" : "hu", "Iceland" : "is", "India" : "in", "Indonesia" : "id", "Iran" : "ir", "Iraq" : "iq", "Ireland" : "ie", "Israel" : "il", "Italy" : "it", "Jamaica" : "jm", "Japan" : "jp", "Jordan" : "jo", "Kazakhstan" : "kz", "Kenya" : "ke", "Kiribati" : "ki", "Korea : North" : "kp", "Korea : South" : "kr", "Kuwait" : "kw", "Kyrgyzstan" : "kg", "Laos" : "la", "Latvia" : "lv", "Lebanon" : "lb", "Lesotho" : "ls", "Liberia" : "lr", "Libya" : "ly", "Liechtenstein" : "li", "Lithuania" : "lt", "Luxembourg" : "lu", "Macedonia" : "mk", "Madagascar" : "mg", "Malawi" : "mw", "Malaysia" : "my", "Maldives" : "mv", "Mali" : "ml", "Malta" : "mt", "Marshall Islands" : "mh", "Mauritania" : "mr", "Mauritius" : "mu", "Mexico" : "mx", "Micronesia" : "fm", "Moldova" : "md", "Monaco" : "mc", "Mongolia" : "mn", "Morocco" : "ma", "Mozambique" : "mz", "Namibia" : "na", "Nauru" : "nr", "Nepal" : "np", "Netherlands" : "nl", "New Zealand" : "nz", "Nicaragua" : "ni", "Niger" : "ne", "Nigeria" : "ng", "Norway" : "no", "Oman" : "om", "Pakistan" : "pk", "Panama" : "pa", "Papua New Guinea" : "pg", "Paraguay" : "py", "Peru" : "pe", "Philippines" : "ph", "Poland" : "pl", "Portugal" : "pt", "Qatar" : "qa", "Romania" : "ro", "Russia" : "ru", "Rwanda" : "rw", "Samoa" : "ws", "San Marino" : "sm", "Sao Tome" : "st", "Saudi Arabia" : "sa", "Senegal" : "sn", "Serbia and Montenegro" : "rs", "Seychelles" : "sc", "Sierra Leone" : "sl", "Singapore" : "sg", "Slovakia" : "sk", "Slovenia" : "si", "Solomon Islands" : "sd", "Somalia" : "so", "South Africa" : "za", "Spain" : "es", "Sri Lanka" : "lk", "Sudan" : "sd", "Suriname" : "sr", "Swaziland" : "sz", "Sweden" : "se", "Switzerland" : "ch", "Syria" : "sy", "Taiwan" : "tw", "Tajikistan" : "tj", "Tanzania" : "tz", "Thailand" : "th", "Togo" : "tg", "Tonga" : "to", "Trinidad and Tobago" : "tt", "Tunisia" : "tn", "Turkey" : "tr", "Turkmenistan" : "tm", "Uganda" : "ug", "Ukraine" : "ua", "United Arab Emirates" : "ae", "United Kingdom" : "gb", "United States" : "us", "Uruguay" : "uy", "Uzbekistan" : "uz", "Vanuatu" : "vu", "Venezuela" : "ve", "Vietnam" : "vn", "Yemen" : "ye", "Zambia" : "zm", "Zimbabwe" : "zw" };
// This will run the generic validation function vForm and not let the form submit until vform returns true
lp.jQuery().ready(function() {
var id=window.module.lp.form.data.formButtonId;
// deletes unbounce-added submit function:
lp.jQuery("#"+id).unbind("click");
lp.jQuery("#"+id).click(function(e) {
e.preventDefault();
e.stopPropagation();
if (vForm()) { lp.jQuery("form").submit(); }
}); });
// vForm : a generic function - here translate country value
// when field country=France then set field hidden_country=fr etc...
// in webhook, I can post ?my_CRM_country_variable=(hidden_country)
// and my CRM is happy!
function vForm() {
var Vcountry=lp.jQuery("#country").val();
var translate=translate_countrytVcountry];
// alert("debug before: country="+Vcountry+" hidden_country= "+lp.jQuery("#hidden_country").val());
if (translate == undefined) translate='';
lp.jQuery("#hidden_country").val(translate);
// alert("debug after: country="+Vcountry+" hidden_country= "+lp.jQuery("#hidden_country").val()); return false;
return true; }
Bruno Rochat, http://www.evidian.com/safekit
Hi Bruno,
Thanks for sharing this, it has helped me saving lots of time digging information from Google, and begging our MIS team to help me out on the coding. Appreciated that, really!
Reply
Log in to the Unbounce Community
No account yet? Create an account
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.