MATRIX and MULTI with 1 MATRIXCOLUMN

"Luca Notari" <[email protected]> Wed, 21 Nov 2007 18:20:24 +0100
Newsgroups gmane.comp.apache.mod-survey.general
Message-ID <000601c82c62$cdf34af0$9602a8c0@asus01>
This is a multi-part message in MIME format.

------=_NextPart_000_0007_01C82C6B.2FB7B2F0
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: 7bit

Hi all,
 
I've experienced this kind of problem, using MATRIX tag with MULTI="yes"
attribute in multipage survey: submitted variables have values as first
time submitted even if I go back and change them. 
 
The reason why I've used Multi is that is not possible to reset radio
button (displayed as default for matrix) if : I have 1 column only,
variables are submitted yet (i.e. going back with browser buttons).
 
here an example:
 
page1.survey
....
<MATRIX NAME="my" MULTI="yes">
   <MATRIXCOLUMN CAPTION="tick" VALUE="1" />
   <MATRIXROW CAPTION="a" />
   <MATRIXROW CAPTION="b" />
   <MATRIXROW CAPTION="c" />
</MATRIX>
<ROUTE CONTINUE=page2.survey/>
 
 
page2.survey
...
for ($i=1; $i<=3; $i++) {
$n="0".$i;
print $session->getValue("SUBMITTED_my$n")
}
...
 
if, for the first time, i select a,b,c in page1 then go to page 2,
variables are 1,1,1 ; OK.    But if I go back, unselect a, unselect b,
then go again to page2 variables are still 1,1,1, and not -1,-1,1 .   
 
If I don't use MULTI attr , the problem doesn't exists , but because if
i go back I can't de-select radio buttons . 
 
Is there any possibility to use MULTI with 1 column only? 
 
thanks,
 
Luca Notari

------=_NextPart_000_0007_01C82C6B.2FB7B2F0
Content-Type: text/html;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Dus-ascii">
<TITLE>Messaggio</TITLE>

<META content=3D"MSHTML 6.00.2900.3199" name=3DGENERATOR></HEAD>
<BODY>
<DIV><SPAN class=3D375545016-21112007><FONT face=3DArial size=3D2>Hi=20
all,</FONT></SPAN></DIV>
<DIV><SPAN class=3D375545016-21112007><FONT face=3DArial=20
size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D375545016-21112007><FONT face=3DArial size=3D2>I've =
experienced=20
this kind of problem, using MATRIX tag with MULTI=3D"yes" attribute in =
multipage=20
survey: submitted variables have values as first time submitted even if =
I go=20
back and change them.&nbsp;</FONT></SPAN></DIV>
<DIV><SPAN class=3D375545016-21112007><FONT face=3DArial=20
size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D375545016-21112007><FONT face=3DArial size=3D2>The =
reason why I've=20
used Multi is that is not possible to reset radio button (displayed as =
default=20
for matrix) if : I have 1 column only, variables are submitted yet (i.e. =
going=20
back with browser buttons).</FONT></SPAN></DIV>
<DIV><SPAN class=3D375545016-21112007><FONT face=3DArial=20
size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D375545016-21112007><FONT face=3DArial size=3D2>here =
an=20
example:</FONT></SPAN></DIV>
<DIV><SPAN class=3D375545016-21112007><FONT face=3DArial=20
size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D375545016-21112007><FONT face=3DArial=20
size=3D2>page1.survey</FONT></SPAN></DIV>
<DIV><SPAN class=3D375545016-21112007><FONT face=3DArial=20
size=3D2>....</FONT></SPAN></DIV>
<DIV><SPAN class=3D375545016-21112007><FONT face=3DArial =
size=3D2>&lt;MATRIX NAME=3D"my"=20
MULTI=3D"yes"&gt;</FONT></SPAN></DIV>
<DIV><SPAN class=3D375545016-21112007><FONT face=3DArial =
size=3D2>&nbsp;&nbsp;=20
&lt;MATRIXCOLUMN CAPTION=3D"tick" VALUE=3D"1" /&gt;</FONT></SPAN></DIV>
<DIV><SPAN class=3D375545016-21112007><FONT face=3DArial =
size=3D2>&nbsp;&nbsp;=20
&lt;MATRIXROW CAPTION=3D"a" /&gt;</FONT></SPAN></DIV>
<DIV><SPAN class=3D375545016-21112007><FONT face=3DArial =
size=3D2>&nbsp;&nbsp;=20
&lt;MATRIXROW CAPTION=3D"b" /&gt;</FONT></SPAN></DIV>
<DIV><SPAN class=3D375545016-21112007><FONT face=3DArial =
size=3D2>&nbsp;&nbsp;=20
&lt;MATRIXROW CAPTION=3D"c" /&gt;</FONT></SPAN></DIV>
<DIV><SPAN class=3D375545016-21112007><FONT face=3DArial=20
size=3D2>&lt;/MATRIX&gt;</FONT></SPAN></DIV>
<DIV><SPAN class=3D375545016-21112007><FONT face=3DArial =
size=3D2>&lt;ROUTE=20
CONTINUE=3Dpage2.survey/&gt;</FONT></SPAN></DIV>
<DIV><SPAN class=3D375545016-21112007><FONT face=3DArial=20
size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D375545016-21112007><FONT face=3DArial=20
size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D375545016-21112007><FONT face=3DArial=20
size=3D2>page2.survey</FONT></SPAN></DIV>
<DIV><SPAN class=3D375545016-21112007><FONT face=3DArial=20
size=3D2>...</FONT></SPAN></DIV>
<DIV><SPAN class=3D375545016-21112007><FONT face=3DArial size=3D2>for =
($i=3D1; $i&lt;=3D3;=20
$i++) {</FONT></SPAN></DIV>
<DIV><SPAN class=3D375545016-21112007><FONT face=3DArial=20
size=3D2>$n=3D"0".$i;</FONT></SPAN></DIV>
<DIV><SPAN class=3D375545016-21112007><FONT face=3DArial size=3D2>print=20
$session-&gt;getValue("SUBMITTED_my$n")</FONT></SPAN></DIV>
<DIV><SPAN class=3D375545016-21112007><FONT face=3DArial=20
size=3D2>}</FONT></SPAN></DIV>
<DIV><SPAN class=3D375545016-21112007><FONT face=3DArial=20
size=3D2>...</FONT></SPAN></DIV>
<DIV><SPAN class=3D375545016-21112007><FONT face=3DArial=20
size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D375545016-21112007><FONT face=3DArial size=3D2>if, =
for the first=20
time, i select a,b,c in page1 then go to page 2, variables are 1,1,1 ;=20
OK.&nbsp;&nbsp;&nbsp; But if I go back, unselect a, unselect b, then go =
again to=20
page2 variables are still 1,1,1, and not -1,-1,1 .&nbsp;&nbsp;=20
</FONT></SPAN></DIV>
<DIV><SPAN class=3D375545016-21112007><FONT face=3DArial=20
size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D375545016-21112007><FONT face=3DArial size=3D2>If I =
don't use MULTI=20
attr , the problem doesn't exists , but because if i go back I can't =
de-select=20
radio buttons . </FONT></SPAN></DIV>
<DIV><SPAN class=3D375545016-21112007><FONT face=3DArial=20
size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D375545016-21112007><FONT face=3DArial size=3D2>Is =
there any=20
possibility to use MULTI with 1 column only? </FONT></SPAN></DIV>
<DIV><SPAN class=3D375545016-21112007><FONT face=3DArial=20
size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D375545016-21112007><FONT face=3DArial=20
size=3D2>thanks,</FONT></SPAN></DIV>
<DIV><SPAN class=3D375545016-21112007><FONT face=3DArial=20
size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D375545016-21112007><FONT face=3DArial size=3D2>Luca=20
Notari</FONT></SPAN></DIV></BODY></HTML>

------=_NextPart_000_0007_01C82C6B.2FB7B2F0--

Skickat av "Luca Notari" <[email protected]>
till survey-discussion