Marketo Form function
In a landing page with Marketo Form, below JS is redirecting to else condition only. The given JS is helping to print the rich html content based on Marketo Form value selected from fieldID and rich html text id is myselect. Can anyone refer the exact if condition rule in Marketo function form in the given JS?
<p id="mySelect"> {{lead.First Name}}, dummy text</p>
<script>
MktoForms2.whenReady(function (form) {
// Put your code that uses the form object here
var x = document.getElementById("fieldID").value;
if (x == "TRUE") {
document.getElementById("mySelect").innerHTML = "this is test case-1";
} else {
document.getElementById("mySelect").innerHTML = "this is test case-2 ";
}
});
</script>