From 79682e7627863cac920dd72550841fcbe98c988b Mon Sep 17 00:00:00 2001 From: Jyrki Lilja Date: Tue, 3 Dec 2013 20:09:34 +1300 Subject: [PATCH] Fix #175. Bring back support checking for radio field values. --- code/model/UserDefinedForm.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/model/UserDefinedForm.php b/code/model/UserDefinedForm.php index aceae81..fc0be63 100755 --- a/code/model/UserDefinedForm.php +++ b/code/model/UserDefinedForm.php @@ -747,7 +747,7 @@ JS $expression = '$(this).attr("checked")'; } else if ($radioField) { // We cannot simply get the value of the radio group, we need to find the checked option first. - $expression = '$(this).parents(".field").find("input:checked").val()=="'. $dependency['Value'] .'"'; + $expression = '$(this).parents(".field, .control-group").find("input:checked").val()=="'. $dependency['Value'] .'"'; } else { $expression = '$(this).val() == "'. $dependency['Value'] .'"'; } @@ -774,7 +774,7 @@ JS $expression = '!$(this).attr("checked")'; } else if ($radioField) { // We cannot simply get the value of the radio group, we need to find the checked option first. - $expression = '$(this).parents(".field").find("input:checked").val()!="'. $dependency['Value'] .'"'; + $expression = '$(this).parents(".field, .control-group").find("input:checked").val()!="'. $dependency['Value'] .'"'; } else { $expression = '$(this).val() != "'. $dependency['Value'] .'"'; }