radio button checked from DB query problem
Looking at the Appery Docs
http://docs.appery.io/documentation/u...
precode
$('input[name="radio_group"][value="1"]').attr('checked', true);
$('input[name="radio_group"]').checkboxradio("refresh");
/code/pre
But I am unable to get this to work: (my code)
precode
console.log('answer :' + getVar('currentAnswer'));
switch(getVar('currentAnswer')) {
case 1:
Code: Select all
$('input[name="yesAgreeButton"][value="1"]').attr('checked', true); $('input[name="yesAgreeButton"]').checkboxradio("refresh");
break;
case 2:
Code: Select all
case 3: }
/code/pre
Its coming back with 1. Console can see its returning that number. But my button is not selected! The result is either 1,2,3.
Also, I seem to be unable to populate the radio box direct from the query result, if that correct ?
Any ideas ?