Checkboxradio: Retrieve form ID via .getAttribute()

Closes gh-7224
Fixes gh-7223

(cherry picked from commit 9ff610de479097c85ec7289e67fc656e5581d817)