Trying to hide a button in a repeater if they change the radio group but I just cant seem to get what to do. My code so far is useless :(

$w.onReady( function () {
$w( ‘#radioGroup1’ ).onClick ( (event, $w) => {
resetRadioButtons();
$w( ‘#voteButton’ ).show();
let $item = $w.at (event.context)
$w( ‘#radioGroup1’ ).selectedIndex = 0 ;

console.log ( “Reset button works and button shows” );
})
});

export function resetRadioButtons () {
$w( ‘#radioGroup1’ ).selectedIndex = undefined;
}

export function radioGroup1_onChange (event,$w) {
$w( ‘#voteButton’ ).hide();
}

No answers? I am also trying to hid/show an element based on radio button selection

If you try to hide a button inside a repeater, then your code won’t work.

Instead try the following code: EXAMPLE

$w.onReady(()=>{
	$w('#yourRepeaterIdHere').onItemReady(($item, itemData, index)=>{
		$item('#radioGroup1').onChange ( (event, $w) => {
			console.log(event.target.id+" changed");
			$item('#voteButton').show();
		});
	});
});