lizmap-web-client icon indicating copy to clipboard operation
lizmap-web-client copied to clipboard

[Question]: default today date doesn't show up automatically in edit form

Open ocelot73 opened this issue 2 years ago • 5 comments

What is the question?

In QGIS attribute form widget related to a "date" type field I insert as default value: now() When i enter edit form in Lizmap I would expect to see in calendar widget today's date, instead nothing appears and I have to click on calendar icon and select date needed.

image

In lizmap desktop plugin server & lizmap are correctly detected and even in LWC Qgis server information administration section. How can setup my qgis project to make LWC correctly show current date when acticating edit form ? Thanks. Bye

Versions

Versions :

  • Lizmap Web Client : 3.5.5
  • Lizmap plugin : 3.9.0
  • QGIS Desktop : 3.22.9
  • QGIS Server : 3.22.9
  • QGIS Server plugin atlasprint : 3.3.1
  • QGIS Server plugin lizmap_server : 1.1.0
  • QGIS Server plugin wfsOutputExtension : 1.7.0

Check Lizmap plugin

  • [X] I have done the step just before in the Lizmap QGIS desktop plugin before opening this ticket.

QGIS server version, only if the section above doesn't mention the QGIS Server version

3.22.9

Operating system

Ubuntu 20.04

Browsers

Chrome

Browsers version

Chrome 103.0.5060.134

Relevant log output

No response

ocelot73 avatar Jul 26 '22 14:07 ocelot73

Can you show precisely what is the expression used in your form ? Screenshot and full text expression

What kind of field is-it as well ? In yoru vector properties, "fields" tab".

Gustry avatar Jul 26 '22 15:07 Gustry

The vector is a postgis table with geometry. The desired column type is "timestamp without time zone". In QGIS desktop: field type "QDateTime" - "timestamp"

Here is the screenshot of expression used: image

ocelot73 avatar Jul 26 '22 16:07 ocelot73

A date SQL field, QDate in QGIS works well for me.

Gustry avatar Jul 27 '22 22:07 Gustry

I've not explained well the issue, sorry. If I initially click on Edit button, edit form shows up and I actually see today's date correctly set at startup (even if field type is timestamp not only date ) The problem is if I click before on a geometry which has a NULL value in date field, and then I click on the pencil icon in the popup, date widget doesn't not show today's date. I'd like to find a way to force showing up today's date in THAT edit form. Is it possible ? I mean, only for null values, I'd like to have a date widget showing up today's date as standard value (not a null one).

ocelot73 avatar Aug 24 '22 11:08 ocelot73

This issue is missing some feedbacks. 👻 Please have a look to the discussion, thanks. 🦎

3liz-bot avatar Sep 27 '22 05:09 3liz-bot

This issue is missing some feedbacks. 👻 Please have a look to the discussion, thanks. 🦎

3liz-bot avatar Nov 01 '22 05:11 3liz-bot