Encountering an issue in Bootstrap while attempting to incorporate custom radio buttons and a hyperlink in the same row. It seems that either the hyperlink functions OR the data-toggle feature for radio buttons works, but not both simultaneously, especially within the standard col structure. There may be an error in my implementation, but I am unable to identify it.
Issue with Radio Buttons Functioning: The radio buttons work correctly, but clicking on the hyperlink does not trigger any action (remains on the same page).
<div class="container">
<div class="row align-content-center">
<div class="col text-center d-none d-md-block"><h4>Column One</h4></div>
<div class="col text-center"><h4>Column Two</h4></div>
<div class="col text-center"><h4>Column Three</h4></div>
<div class="col text-center"><h4>Column Four</h4></div>
</div>
<div class="row align-content-center btn-group btn-group-toggle" data-toggle="buttons">
<div class="col text-center d-none d-md-block"><h4>Column One</h4></div>
<div class="col text-center">
<label class="btn btn-outline-primary">
<input type="radio" style="visibility:hidden" name="options" id="option1" value="1" autocomplete="off" />
Option One
</label>
</div>
<div class="col text-center">
<label class="btn btn-outline-primary">
<input type="radio" style="visibility:hidden" name="options" id="option2" value="2" autocomplete="off" />
Option Two
</label>
</div>
<div class="col text-center">
<a asp-area="" asp-controller="Home" asp-action="Index">
<img src="~/img/home.png" alt="Home Page" title="Home Page" />
</a>
</div>
</div>
</div>
Issue with Hyperlink Functionality: The hyperlink works fine, but the radio buttons do not stay selected after clicking.
<div class="container">
<div class="row align-content-center">
<div class="col text-center d-none d-md-block"><h4>Column One</h4></div>
<div class="col text-center"><h4>Column Two</h4></div>
<div class="col text-center"><h4>Column Three</h4></div>
<div class="col text-center"><h4>Column Four</h4></div>
</div>
<div class="row align-content-center">
<div class="col text-center d-none d-md-block"><h4>Column One</h4></div>
<div class="col text-center">
<label class="btn btn-outline-primary">
<input type="radio" style="visibility:hidden" name="options" id="option1" value="1" autocomplete="off" />
Option One
</label>
</div>
<div class="col text-center">
<label class="btn btn-outline-primary">
<input type="radio" style="visibility:hidden" name="options" id="option2" value="2" autocomplete="off" />
Option Two
</label>
</div>
<div class="col text-center">
<a asp-area="" asp-controller="Home" asp-action="Index">
<img src="~/img/home.png" alt="Home Page" title="Home Page" />
</a>
</div>
</div>
</div>
The issue lies in the div with the row containing "btn-group btn-group-toggle" data-toggle="buttons."
Another method attempted was to include a div with the data-toggle specifically around the radio buttons, which allowed the hyperlink to function but altered the layout and behavior of the radio buttons as a side effect.