BUG - Mismatched "for" and "id" in radio boxes and checkboxes

In registration forms, the label for attribute does not match the input id in radio boxes and checkboxes. Therefore clicking the label does not trigger the checkbox or radio to be selected. In the screenshot attached you can see two additional dashes in the input id.

1 Like

I’ve just noticed that this is still an issue

s2member/src/includes/classes/custom-reg-fields.inc.php

line 208 and 242 are

$common_i = preg_replace('/ id\="(.+?)"/', ' id="$1---'.($i).'"', $common);

and should be

$common_i = preg_replace('/ id\="(.+?)"/', ' id="$1-'.($i).'"', $common);

There looks to be two extra minus symbols. I’ve done very limited testing and this seems to fix it.

Thanks for reporting it! I fixed it for the next release.

You can try this zip to see if it works well for you now. s2member-v260220.50189.zip (1.4 MB)

:slight_smile:

1 Like

Cool that seems to do the trick.

One day I’ll put together that UK postcode patch and actually submit it

1 Like

Cool :slight_smile: