Support Article
Incorrect behavior reported for radio buttons
SA-14987
Summary
When using radio button controls, user selects a value and refreshes the section, and observe that the the previous value is updated instead.
Error Messages
No error message.
Steps to Reproduce
Create section where Radio button is repeated and have same response value in the multiple pages of the page list.
Root Cause
The scenario here is expected product behavior, When user selects an "Inline" option in "Row editing". As user wants to make the row editable always.
So, the visibility condition nullifies here. As both are complimentary to each other there can be either the rows always available for editing or conditional visibility.
Resolution
The radio button selection behavior on click of label is imparted automatically by the browser based on the for attribute.
To disable selection of radio button on click of label,
1) Add myclass for radio buttons in the Presentation tab (read and write).
2) Use below script in userworkform:
<script>
/* Fire the right radio button on click of label */
function fireRadioButtons() {
$('.myclass label[for]').click(function(e) {
// Prevent default action of auto firing
e.preventDefault();
});
}
/* When the DOM is loaded invoke harness_execute */
$(function() {
// Attach to harness onloads
var e = window.event;
pega.u.d.harness_execute(fireRadioButtons, true, e);
});
</script>
Published January 31, 2016 - Updated October 8, 2020
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.