I have found a bunch of scattered resources on this issue but I am having trouble putting them altogether to get a complete answer. I am trying to have check boxes pre-populated based on contact fields (not subscription groups). This is the code I have so far:
<script type="text/javascript" src="http://img.en25.com/Web/ReadyTalk/elq-validate.js
"></script><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script type='text/javascript' language='JavaScript' src='http://www.readytalk.com/sites/all/themes/readytalk/js/elqNow/elqCfg.js'></script>
<script type='text/javascript' language='JavaScript' src='http://www.readytalk.com/sites/all/themes/readytalk/js/elqNow/elqImg.js'></script>
<script type="text/javascript" language="javascript" src="http://img.en25.com/Web/ReadyTalk/jquery-1.4.2.min.js"></script>
<title>Subscription Status</title>
<script type="text/javascript">
//Field based propopulation variable setting
var featureupdates = "<span class="eloquaemail" >featureUpdates&ProductNews</span>";
var custOnboard = "<span class="eloquaemail" >customerOnboardingOptIn</span>";
var news = "<span class="eloquaemail" >marketingNewsAndEducation</span>";
var webinar = "<span class="eloquaemail" >webSeminarSeriesOptIn"</span>";
var custnews = "<span class="eloquaemail" >customerNewsletter</span>";
$(document).ready(function() {
//Uncheck UnsubAll checkbox
$(".subPrefs").click(function()
$('#unsubAll').attr('checked', false);
});
//UnSelect All logic
$('#unsubAll').click(function() {
if($('#unsubAll').attr('checked') == true){
$('.subPrefs').attr('checked', false);
}
});
if(featureupdates == 1) {
$('#featureUpdates&ProductNews').val(featureupdates);
$('#featureUpdates&ProductNews').attr('checked','checked');
}
if(custOnboard == 1) {
$('#customerOnboardingOptIn').val(custOnboard);
$('#customerOnboardingOptIn').attr('checked','checked');
}
if(news == 1) {
$('#marketingNewsAndEducation').val(news);
$('#marketingNewsAndEducation').attr('checked','checked');
}
if(webinar == 1) {
$('#webSeminarSeriesOptIn').val(webinar);
$('#webSeminarSeriesOptIn').attr('checked','checked');
}
}
if(custnews == 1) {
$('#customerNewsletter').val(custnews);
$('#customerNewsletter').attr('checked','checked');
}
});
</script>
This is not working.
I read somewhere i need this line of .js:
<script language="javascript" type="text/javascript" src="/elqNow/elqCPers.js"></script>
but i don't know where to put it as the poster suggested there was a correct order to placing it.The full page can be found here:
Any helpers out there?