[Lizmap] conditional forms

michal.wloga at envirosolutions.pl michal.wloga at envirosolutions.pl
Fri Apr 30 02:39:43 PDT 2021


Hi devs,

 

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.

 

Context:

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<<

 

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"

 

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.

 

 

Regards,

EnviroSolutions Sp. z o. o.
Michał Włoga
tel: +48 607 059 157
 <mailto:coo at envirosolutions.pl> coo at envirosolutions.pl
 <http://www.envirosolutions.pl/szkolenia> www.envirosolutions.pl

 
<https://www.envirosolutions.pl/news/118/129/Wtyczka-QGIS---Pobieracz-Danych
-GUGiK.html> Pobieracz Danych GUGiK - laureat nagrody GUGiK na najlepsze
wykorzystanie danych i usług GUGiK w 2020 r.

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/lizmap/attachments/20210430/dc5b5e6e/attachment.html>


More information about the Lizmap mailing list