Hello Chris,
I have attached some JavaScript similar to what we have used in the past to read the query string. Also included is an example of how to split logic, hide fields or disable fields using our API:
var queryString;
(window.onpopstate = function () {
var match,
pl = /\+/g, // Regex for replacing addition symbol with a space
search = /([^&=]+)=?([^&]*)/g,
decode = function (s) { return decodeURIComponent(s.replace(pl, " ")); },
query = window.location.search.substring(1);
queryString = {};
while (match = search.exec(query))
queryString[decode(match[1])] = decode(match[2]);
})();
$(document).ready(function(){
var show = queryString["bitValue"] == "true";
if(show) {
$(".CrmTextField_C004").hide();
$(".CrmTextField_C005").hide();
$(".CrmTextField_C006").hide();
}
else {
$(".CrmTextField_C001").hide();
$(".CrmTextField_C002").hide();
$(".CrmTextField_C003").hide();
// if you want the field not to be submitted to CRM:
findControl(".CrmTextField_C001").disable();
}
});
Please let me know if you have any questions.
Regards,
Clinton