I have a similar situation - I have a control that's a toggle. If the user is using the free version - I don't want them to be able to change the value ... so - in the value change event for this control - I've added this code:
if (!bpaid){
alert('In the free version - you cannot change the state of this control');
Appery( this.name).val('on');
Appery( this.name).refresh();
console.log('refreshed control');
}
I've also tried the suggestion above - and done Appery(this.name).val('on').refresh() - no change .
the value changes just fine - and the code and the debugger report the value as 'on' after this method runs - yet visually - it still appears on the 'off' state when toggled (undesirable)
I also can't via the debugger or via the code (i've entered all these commands in the debugger as well with the break point set on my console.log step above - and the control refuses to be controlled
. I've told it to hide() (it doesn't hide). I've set the attribute 'disabled' to disabled - the debugger even reports that this attribute is set to disabled - but low and behold - it is still alive and kicking and accepts input.
(PS - I've also used the control name specifically - Appery('toggle_copyme').val('on').refresh() to no avail as well )
Suggestions please???
Thanks
Bruce