Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Radio button (column 1) not getting selected if I click on any other column in a row

Shaily2
Tera Contributor

I have created a simple 3 column table with column 1 as radio button. The problem is upon clicking any of the other two columns, i could not get radio to be selected. The radio gets selected when we click on it specifically. My actual code snippet in servicenow :

Shaily2_0-1698197375530.png

 

 

Here's my code :
<tbody>
<tr ng-repeat="add in c.services track by $index">
<td><input value="1" id="radio_1" name="type_radio" type="radio" ng-click="c.onServiceSelection(add)"/></td>
<td>
<a href="javascript&colon;void(0)" class="clickable" ng-click="c.onServiceSelection(add)">{{add.Name}}</a>
</td>
<td>
<a href="javascript&colon;void(0)" class="clickable" ng-click="c.onServiceSelection(add)">{{add.Profile}}</a>
</td>
</tr>
</tbody>

Not able to get the radio button working. I have tried making use of id and name , but it results in selecting the first radio buttton, no matter where you click

<div>
<label for="test">Radio Button Label</label>
</div>

<div>
<input type="radio" id="test" name="test" />
</div>

0 REPLIES 0