فهرست منبع

Fix radio input checked

Alan Lam 2 سال پیش
والد
کامیت
5ed2281f5b
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  1. 1 1
      engine/form.php

+ 1 - 1
engine/form.php

@@ -469,7 +469,7 @@ class Form {
 			<?php
 			<?php
 			foreach($options->values as $index => $value) {
 			foreach($options->values as $index => $value) {
 				$display = $options->displayStrings[$index];
 				$display = $options->displayStrings[$index];
-				$checked = ($current_value === (string) $value) ? "checked" : "";
+				$checked = ((string) $current_value === (string) $value) ? "checked" : "";
 				$radio_id = sprintf("%s-%s", $id, $value);
 				$radio_id = sprintf("%s-%s", $id, $value);
 
 
 				if($index === 0 && $current_value === null) {
 				if($index === 0 && $current_value === null) {