This may be a really dumb question, however I'm struggling to set a radio button client side using jquery.
I have tried:
$("#x_myfield_716023]").prop("checked", true);
... and this works well when testing in the console, but how on earth do you set the radio button when the "appended number" keep on changing every time the page load?
What confuses me is the "appended number" that changes, so I cannot use the name nor the id of the element:
<input type="radio" class="form-check-input ew-custom-option" data-table="mytable" data-field="x_myfield" **name="x_myfield_383588" id="x_myfield_716023"** value="1" data-index="0" style="">
As you can see that both name and id attributes have an appended number (that changes every time the page load). How can I select it to use the jquery code above to set the radio button?
Thank you in advance.