diff --git a/modules/backend/classes/FormField.php b/modules/backend/classes/FormField.php
index 36a0dab75..4be372c04 100644
--- a/modules/backend/classes/FormField.php
+++ b/modules/backend/classes/FormField.php
@@ -351,6 +351,20 @@ class FormField
return $this;
}
+ /**
+ * Determine if the provided value matches this field's value.
+ * @param string $value
+ * @return bool
+ */
+ public function isSelected($value = true)
+ {
+ if ($this->value === null) {
+ return false;
+ }
+
+ return (string) $value === (string) $this->value;
+ }
+
/**
* Sets the attributes for this field in a given position.
* - field: Attributes are added to the form field element (input, select, textarea, etc)
diff --git a/modules/backend/widgets/form/partials/_field_balloon-selector.htm b/modules/backend/widgets/form/partials/_field_balloon-selector.htm
index 20912519d..ffb725d45 100644
--- a/modules/backend/widgets/form/partials/_field_balloon-selector.htm
+++ b/modules/backend/widgets/form/partials/_field_balloon-selector.htm
@@ -9,7 +9,7 @@
= $field->getAttributes() ?>>
$text): ?>
- - = e(trans($text)) ?>
+ - = e(trans($text)) ?>
diff --git a/modules/backend/widgets/form/partials/_field_checkbox.htm b/modules/backend/widgets/form/partials/_field_checkbox.htm
index 962501a34..5fdd87766 100644
--- a/modules/backend/widgets/form/partials/_field_checkbox.htm
+++ b/modules/backend/widgets/form/partials/_field_checkbox.htm
@@ -11,7 +11,7 @@
name="= $field->getName() ?>"
value="1"
= $this->previewMode ? 'disabled="disabled"' : '' ?>
- = $field->value == 1 ? 'checked="checked"' : '' ?>
+ = $field->isSelected() ? 'checked="checked"' : '' ?>
= $field->getAttributes() ?>>