Closed RTC1 closed 6 years ago
Sorry about that. Forgot to run tests before releasing 1.6.4 👎
I don't think this fixes the problem, or am I the only one still getting the same id/for's in the child-form elements here? Updated to latest dev-master.
FYI: If I comment out the if ($element->control->getAttribute('id')===null)
check, and always apply $element->control = $element->control->id($this->controlId($element));
it does work fine again.
Can you show the code you are using to produce the radiogroup?
Tested with (practically) the same code as above:
{{ bs()->radioGroup('agree_terms', [
'y' => 'I am interested!',
'n' => 'No, thanks.',
], 'y') }}
Produced HTML (no changes):
<div class="radio-group" id="agree_terms_radio_group">
<div class="custom-control custom-radio">
<input class="custom-control-input" type="radio" checked="checked" name="agree_terms" id="agree_terms" value="y">
<label class="custom-control-label" for="agree_terms">I am interested!</label>
</div>
<div class="custom-control custom-radio">
<input class="custom-control-input" type="radio" name="agree_terms" id="agree_terms" value="n">
<label class="custom-control-label" for="agree_terms">No, thanks.</label>
</div>
</div>
Code when removing ===null check:
<div class="radio-group" id="agree_terms_radio_group">
<div class="custom-control custom-radio">
<input class="custom-control-input" type="radio" checked="checked" name="agree_terms" id="agree_terms_y" value="y">
<label class="custom-control-label" for="agree_terms_y">I am interested!</label>
</div>
<div class="custom-control custom-radio">
<input class="custom-control-input" type="radio" name="agree_terms" id="agree_terms_n" value="n">
<label class="custom-control-label" for="agree_terms_n">No, thanks.</label>
</div>
</div>
I can confirm the new version sorted it for me.
Ok, started with a fresh vendor folder, did a fresh composer install --prefer-dist
and now it does works as stated here. Don't understand what happend here... (not a single package was "dirty" before).
Terribly sorry for the false bugreport & thanks for the fix!
No worries. I prefer a false positive than a negative that passes by without seeing it ;)
This one seems to have appeared recently (I'm using 1.6.4):
I can't select anything other than the first radio. Upon closer inspection each radio button has the same ID: