Expand my Community achievements bar.

Disabling Buttons

Avatar

Former Community Member
Hi



I am just wondering if it is possible to enabled / disable buttons at runtime.



The scenario is that I have a form with a large number of questions. Some of these questions have sub questions depending on the users choice. I would like to be able to display the sub questions but have them inactive until the user clicks 'no' on radiobutton.



I have been able to gray out all the fields and the button as well as set all the fields as readOnly. I don't seem to be able to stop the button's onclick event though.



Does anyone have any ideas?



Kind Regards



Mike Beaton
4 Replies

Avatar

Former Community Member
Setting the button's access property to "readOnly" would make it unclickable.



Button.access = "readOnly";



Chris

Adobe Enterprise Developer Support

Avatar

Level 2

so how do u enable it back after setting it to read only, whats the code?

Avatar

Former Community Member
Thanks Chris



How stupid do I feel....



Regards



Mike