hi all,
i making a demo for landing pages
I have a registration form that creates a contact
in this form I have lookup with some values but in contact I created a field that will be filled by the selected value from the lookup
the field in contact in string type with Asked About Title and UsrAskedAbout Code
note that: the landing create a contact with all fields except the selected value the dropdown list
thanks
Sign Up Form by Colorlib
var course = ' Choose one Web DevelopmentAccountingFinance';
var brochure = ' Choose one Business and Entrepreneurship UG Brochure 2020 - 2021Economics UG Brochure 2020 - 2021Marketing UG Brochure 2020 - 2021';
var empty = ' Choose one ';
var txt = $("#txt1").val();
// landing
var config = {
fields: {
"FullName": "#full_name", // Name of a contact
"PhoneNumber": "#Mobile_phone", // Contact's mobile phone
"Email": "#email",
"Age": "#Age",
"AskedAbout": "#txt1" // Contact's email
},
contactFields: {
"FullName": "#full_name", // Name of a contact
"Phone": "#Mobile_phone", // Contact's mobile phone
"Email": "#email",
"Age": "#Age",
"AskedAbout": "#txt1"
},
customFields: { "WebFormId": "c15ebe71-dc25-4570-bef8-bd4b44b5749e" },
landingId: "c15ebe71-dc25-4570-bef8-bd4b44b5749e",
serviceUrl: "http://localhost:81/0/ServiceModel/GeneratedObjectWebFormService.svc/Sa…",
redirectUrl: "https://www.google.com"
};
/**
* The function below creates a object from the submitted data.
* Bind this function call to the "onSubmit" event of the form or any other elements events.
* Example:
*/
function createObject() {
// alert($("#txt1").val());
landing.createObjectFromLanding(config);
}
/**
* The function below inits landing page using URL parameters.
*/
function initLanding() {
landing.initLanding(config);
}
$(document).ready(function () {
jQuery(document).ready(initLanding);
$("select#choose1").on('change', function () {
if ($(this).val() == "course") {
$("select#choose2").html(course);
} else if ($(this).val() == "brochure") {
$("select#choose2").html(brochure);
}
else if ($(this).val() == "") {
$("select#choose2").html(empty);
}
});
$("select#choose2").on('change', function () {
var txt2= $("select#choose2 option:selected").text();
$("#txt1").val(txt2);
});
});
student registration form
Full name :
Mobile phone :
Age :
Email ID :
Ask about :
(Course - Diploma)
Brochure
Choose one :
Choose one
Like
Not sure I 100% understand the issue you're describing, but you mentioned that the field is called "UsrAskedAbout", and in the js on the landing page you have that as only "AskedAbout" (without the Usr prefix). Could that be what your issue is?
Ryan