Hi there,
I am seeking assistance with a feature implementation on our company's web application. Specifically, I need to determine whether a particular <input>
element within a radio button group is active or not.
To provide some context, our application includes a section with two radio buttons, allowing users to select either 'Yes' or 'No'. The user's choice is saved both in the background and visually indicated using CSS ::before
and ::after
selectors.
Here is the HTML structure of the relevant section for reference, in which the radio button No is active:
<div>
<div>
<label>PayoutCancellation Enabled</label>
<div class="gt-flex-row gt-flex-gap">
<div class="gt-flex-radio">
<input type="radio" name="payoutcancellation" id="PayoutCancellationYes" value="1" title="Enables cancellation possibility of requested payouts by player" />
::before
<label for="PayoutCancellationYes" class="static-text">Yes</label>
</div>
<div class="gt-flex-radio">
<input type="radio" checked name="payoutcancellation" id="PayoutCancellationNo" value="0" title="Disables cancellation possibility of requested payouts by player" />
::before
::after
<label for="PayoutCancellationNo" class="static-text">No</label>
</div>
</div>
</div>
</div>
My question is: How can I detect which radio button (Yes or No) is currently active using the {site} command or any other method?
I appreciate any guidance or resources you can provide regarding this matter.