- Posts: 10249
- Thank you received: 3646
Ask the community, share ideas, and connect with other LimeSurvey users!
Thendevelnick wrote: Ok. And what happens if the user hits the "Previous" button? Is this code executed?
{q1_c=if(is_empty(q1_c.NAOK,if(q2_f=="Y", "Y",""),q1_c.NAOK)}
{q2_f=if(q1_c=="Y", "Y","")} {q1_c=if(q2_f=="Y", "Y","")}
{q1_c=if(is_empty(isDone.NAOK),if(q2_f=="Y", "Y",""),q1_c.NAOK)}{q1_b=if(is_empty(isDone.NAOK),if(q2_g=="Y", "Y",""),q1_c.NAOK)}
G1Q1_C=if(is_empty(isDone.NAOK), if(G2Q1_F == "Y", "Y", ""), G1Q1_C.NAOK)
G2Q1_F=if(is_empty(isDone.NAOK), if(G1Q1_C == "Y", "Y", ""), G2Q1_F.NAOK)
Yes,develnick wrote: I tried that but it works only one-way.
<script type="text/javascript" charset="utf-8"> $(document).ready(function() { var checkedState = false; if('{G2Q1_F}' == 'Y') { checkedState = true; } $('#answer{SGQ}C').prop('checked', checkedState).trigger('change'); }); </script>
<script type="text/javascript" charset="utf-8"> $(document).ready(function() { var checkedState = false; if('{G1Q1_C}' == 'Y') { checkedState = true; } $('#answer{SGQ}F').prop('checked', checkedState).trigger('change'); }); </script>