From 47ea09b75c46c45db94d02dcd7de4b699e72f459 Mon Sep 17 00:00:00 2001 From: dynamicscode Date: Tue, 21 Jul 2020 16:48:54 +1200 Subject: [PATCH] Fix an issue with getValue of disabled radio --- Xrm.Portal.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Xrm.Portal.js b/Xrm.Portal.js index 5cb0934..cc17b62 100644 --- a/Xrm.Portal.js +++ b/Xrm.Portal.js @@ -265,7 +265,7 @@ Xrm.Portal = { return this.controlType.Checkbox; } else if (c.attr("type") == "hidden") { return this.controlType.Lookup; - } else if (c.attr("class") != null && (c.attr("class").startsWith("boolean-radio") || c.attr("class").startsWith("picklist horizontal") || c.attr("class").startsWith("picklist vertical"))) { + } else if (c.attr("class") != null && (c.attr("class").indexOf("boolean-radio") > -1 || c.attr("class").indexOf("picklist horizontal") > -1 || c.attr("class").indexOf("picklist vertical") > -1)) { return this.controlType.Radio; } else { return this.controlType.Control; @@ -502,7 +502,7 @@ Xrm.Portal = { this.vg = ""; this.getValue = function () { - return this.c.children(":checked").val(); + return this.c.find("input:checked").val(); }; this.setValue = function (value) { this.c.children("[value*=" + value + "]").attr("checked", true);