Page 3 of 3

'value change' event for the toggle inside a dynamic list

Posted: Mon May 06, 2013 10:38 am
by Rafael Martínez

Inside this there is another real issue because the val() function for the toggle returns always the same value when the toggle is inside the list.

Find it here:

http://appery.io/app/view/42ec9b46-87...

It is necessary to manually change the val of the toggle in the "value change" event for the toggle in this way:

if (Appery('mobiletoggle_21').val() == "off"){
Appery('mobiletoggle_21').val("on").refresh();
} else {
Appery('mobiletoggle_21').val("off").refresh();
}


'value change' event for the toggle inside a dynamic list

Posted: Tue May 07, 2013 1:38 pm
by Oleg Danchenkov

Hi Rafael.
Appery('mobiletoggle_21') refers to hidden element used for mapping.
On Value change event you should use $(this) instead of Appery('mobiletoggle_21').
Change
alert(Appery('mobiletoggle_21').val());
to
alert($(this).val());


'value change' event for the toggle inside a dynamic list

Posted: Tue May 07, 2013 9:16 pm
by Rafael Martínez

This works!, thank you so much.


'value change' event for the toggle inside a dynamic list

Posted: Fri Jul 17, 2020 3:57 pm
by Rafael Martínez

\n {\n \""name\"": \""two\""\n }