[Lizmap] conditional forms

Etienne Trimaille etrimaille at 3liz.com
Tue May 4 19:52:40 PDT 2021


Hi,

Thanks for taking some time to debug the issue.
I'm not very able to review this side of the code unfortunately.
Maybe better to raise the discussion on GitHub ?

Can you also confirm which Lizmap version and QGIS Server/Desktop ? with
patch number included.

Le mar. 4 mai 2021 à 13:25, <michal.wloga at envirosolutions.pl> a écrit :

> Hi,
>
>
>
> I found out that checkbox field always sends to php ‘f’ value because of
>
>
>
> *$unchecked = (string) ($this->widgetv2configAttr->UncheckedState === '' ?
> 'f' : $this->widgetv2configAttr->UncheckedState);*
>
>
>
> From ‘fillCheckboxValues’ function of ‘qgisFormControl.class.php’
>
>
>
> 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?
>
> Regards,
>
> EnviroSolutions Sp. z o. o.
> Michał Włoga
> tel: +48 607 059 157
> coo at envirosolutions.pl
> www.envirosolutions.pl <http://www.envirosolutions.pl/szkolenia>
>
> Pobieracz Danych GUGiK
> <https://www.envirosolutions.pl/news/118/129/Wtyczka-QGIS---Pobieracz-Danych-GUGiK.html>
> – laureat nagrody GUGiK na najlepsze wykorzystanie danych i usług GUGiK w
> 2020 r.
>
>
>
> *From:* Lizmap [mailto:lizmap-bounces at lists.osgeo.org] *On Behalf Of *
> michal.wloga at envirosolutions.pl
> *Sent:* Friday, April 30, 2021 11:40 AM
> *To:* lizmap at lists.osgeo.org
> *Subject:* [Lizmap] conditional forms
>
>
>
> 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
> coo at envirosolutions.pl
> www.envirosolutions.pl <http://www.envirosolutions.pl/szkolenia>
>
> Pobieracz Danych GUGiK
> <https://www.envirosolutions.pl/news/118/129/Wtyczka-QGIS---Pobieracz-Danych-GUGiK.html>
> – laureat nagrody GUGiK na najlepsze wykorzystanie danych i usług GUGiK w
> 2020 r.
>
>
> _______________________________________________
> Lizmap mailing list
> Lizmap at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/lizmap
>


-- 

Etienne Trimaille
Ingénieur géomaticien
www.3liz.com

WhatsApp uniquement le matin +33 6 12 93 11 39 <https://wa.me/0033612931139>


*Siège social*
73, allée Kleber
Boulevard de Strasbourg
34000 Montpellier
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/lizmap/attachments/20210505/23af6a78/attachment.html>


More information about the Lizmap mailing list