<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=iso-8859-2"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:"MS Mincho";
        panose-1:2 2 6 9 4 2 5 8 3 4;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:"\@MS Mincho";
        panose-1:2 2 6 9 4 2 5 8 3 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=PL link="#0563C1" vlink="#954F72"><div class=WordSection1><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>Hi,<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>I found out that checkbox field always sends to php ‘f’ value because of<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><i><span lang=EN-US style='color:#1F497D'>$unchecked = (string) ($this->widgetv2configAttr->UncheckedState === '' ? '<b>f</b>' : $this->widgetv2configAttr->UncheckedState);<o:p></o:p></span></i></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>From ‘fillCheckboxValues’ function of ‘qgisFormControl.class.php’<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>Unfortunately commenting it out ends with constant response of “0” instead of ‘f’. Does anyone have an idea where to look for a source of this bug?<o:p></o:p></span></p><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=EN-US style='color:#1F497D'>Regards,<o:p></o:p></span></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='color:#33BB5A'>EnviroSolutions Sp. z o. o.<br></span><span style='color:#1F497D'>Michał Włoga<br>tel: +48 607 059 157<br><a href="mailto:coo@envirosolutions.pl">coo@envirosolutions.pl</a><br><a href="http://www.envirosolutions.pl/szkolenia" target="_blank">www.envirosolutions.pl</a></span><span style='color:#00B0F0'><o:p></o:p></span></p><p class=MsoNormal><span style='color:#2E74B5'><a href="https://www.envirosolutions.pl/news/118/129/Wtyczka-QGIS---Pobieracz-Danych-GUGiK.html" target="_blank"><span style='color:#2E74B5'>Pobieracz Danych GUGiK</span></a></span><span style='color:#1F497D'> – laureat nagrody GUGiK na najlepsze wykorzystanie danych i usług GUGiK w 2020 r.<o:p></o:p></span></p></div><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><div><div style='border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span lang=EN-US>From:</span></b><span lang=EN-US> Lizmap [mailto:lizmap-bounces@lists.osgeo.org] <b>On Behalf Of </b>michal.wloga@envirosolutions.pl<br><b>Sent:</b> Friday, April 30, 2021 11:40 AM<br><b>To:</b> lizmap@lists.osgeo.org<br><b>Subject:</b> [Lizmap] conditional forms<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Hi devs,<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><span lang=EN-US>I have found some bugs in qgis forms interpretation in Lizmap. It is connected with LWC and lizmap server plugin and can be fixed in different ways so I don’t know where to post an issue.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>Context:<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>I would like to create a form with visibility based on conditions. In QGIS Desktop everything works correct: via drag and drop forms and groups visibility based on expression eg. >>“boolfield” = true<<<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>The first problem is with checkbox field (Boolean in postgres). JavaScript in LWC sends an request to validate an expression with value “f” if unchecked or “t” if checked. It is forwarded from PHP to lizmap server plugin and it returns False every time because “t” is not recognized as “true”<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>The second problem is that when there is an expression error (e.g. >>”integerfield” % 2 = 0 << and empty string is passed) QGIS Server (via lizmap plugin) returns “null” but php returns “true” without any notice about backend error.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='color:#1F497D'>Regards,<o:p></o:p></span></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=EN-US style='color:#33BB5A'>EnviroSolutions Sp. z o. o.<br></span><span lang=EN-US style='color:#1F497D'>Michał Włoga<br>tel: +48 607 059 157<br></span><span style='color:#1F497D'><a href="mailto:coo@envirosolutions.pl"><span lang=EN-US>coo@envirosolutions.pl</span></a></span><span lang=EN-US style='color:#1F497D'><br></span><span style='color:#1F497D'><a href="http://www.envirosolutions.pl/szkolenia" target="_blank"><span lang=EN-US>www.envirosolutions.pl</span></a></span><span lang=EN-US style='color:#00B0F0'><o:p></o:p></span></p><p class=MsoNormal><span style='color:#2E74B5'><a href="https://www.envirosolutions.pl/news/118/129/Wtyczka-QGIS---Pobieracz-Danych-GUGiK.html" target="_blank"><span style='color:#2E74B5'>Pobieracz Danych GUGiK</span></a></span> – laureat nagrody GUGiK na najlepsze wykorzystanie danych i usług GUGiK w 2020 r.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p></div></body></html>