Merge pull request #550 from robbyahn/bugfix/issue-547-radio-button

issue-547 radio button group display fix
This commit is contained in:
Daniel Hensby 2017-04-03 16:57:55 +01:00 committed by GitHub
commit 5b6c16dbd6

View File

@ -503,7 +503,7 @@ class UserDefinedForm_Controller extends Page_Controller
$expression = '$(this).prop("checked")';
} elseif ($radioField) {
// We cannot simply get the value of the radio group, we need to find the checked option first.
$expression = '$(this).parents(".field, .control-group").find("input:checked").val()=="'. $rule->FieldValue .'"';
$expression = '$(this).closest(".field, .control-group").find("input:checked").val()=="'. $rule->FieldValue .'"';
} else {
$expression = '$(this).val() == "'. $rule->FieldValue .'"';
}