Use label tags in checkbox descriptions.
[readifood.git] / lib / contact.php
index 051f291..a2e9415 100644 (file)
     echo "  <td>";
     for ($i = count($parcel_sizes); $i < count($parcel_contents); $i++) {
       if (1 << $i == $GLOBALS['PARCEL_TOILETRY']) continue;
-      echo "  <input type=\"checkbox\" name=\"parcel_$i\"";
+      echo "  <input type=\"checkbox\" id=\"parcel_$i\" name=\"parcel_$i\"";
       if ($contact->getParcel() & (1 << $i)) echo " checked";
-      echo ">$parcel_contents[$i]\n";
+      echo "><label for=\"parcel_$i\">$parcel_contents[$i]</label>\n";
     }
     echo "</td>\n";
     echo "</tr>\n";