Button deactivation

Ok, let’s say you gave your accept-button the following ID → " btnAccept "

Delete all your code on your page and replace it with the following one…
Publish your website and test it.
Do not forget to to change the ID of your acceptButton, like shown in the example.

$w.onReady(()=>{let counter = 0;
	let btnAccept = $w('#btnAccept');
	btnAccept.onClick((event)=>{
		console.log(event.target.id+"-clicked-"+counter);
		conter = counter +1;		
		if (counter >=5) {btnAccept.disable();}
		else {btnAccept.enable();}
	});
});