diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php
index 945897856f2..82c00e4e4f7 100644
--- a/htdocs/core/class/html.form.class.php
+++ b/htdocs/core/class/html.form.class.php
@@ -4433,7 +4433,7 @@ class Form
var more = "";
var inputvalue;
if ($("input[name=\'" + inputname + "\']").attr("type") == "radio") {
- inputvalue = $("input[name=\'" + inputname + "\']").val();
+ inputvalue = $("input[name=\'" + inputname + "\']:checked").val();
} else {
if ($("#" + inputname).attr("type") == "checkbox") { more = ":checked"; }
inputvalue = $("#" + inputname + more).val();