Skip to content

Commit

Permalink
issue-547 radio button group display fix
Browse files Browse the repository at this point in the history
  • Loading branch information
robbyahn committed Feb 23, 2017
1 parent bb000ca commit ba39031
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion code/model/UserDefinedForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,7 @@ public function generateConditionalJavascript()
$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 .'"';
}
Expand Down

0 comments on commit ba39031

Please sign in to comment.