<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
I think this would fit into the area of this QEP:<br>
<br>
<a class="moz-txt-link-freetext" href="https://github.com/m-kuhn/QGIS-Enhancement-Proposals/blob/fields-and-forms-redesign/QEP-Fields-and-forms-redesign.rst#31-fields">https://github.com/m-kuhn/QGIS-Enhancement-Proposals/blob/fields-and-forms-redesign/QEP-Fields-and-forms-redesign.rst#31-fields</a><br>
<br>
It could be added to the list "Information about fields" next to
"constraints".<br>
<br>
Any feedback on it is welcome.<br>
<br>
Matthias<br>
<br>
<div class="moz-cite-prefix">On 06/26/2015 11:35 AM, Paolo Cavallini
wrote:<br>
</div>
<blockquote
cite="mid:625BDFD1-AFAA-4E0F-9235-E5FD0E4437A3@faunalia.it"
type="cite">Agreed, an important improvement. Please open a ticket
if not already there.<br>
All the best.<br>
<br>
<div class="gmail_quote">Il 26 giugno 2015 08:16:32 GMT+00:00,
"Blumentrath, Stefan" <a class="moz-txt-link-rfc2396E" href="mailto:Stefan.Blumentrath@nina.no"><Stefan.Blumentrath@nina.no></a> ha
scritto:
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt
0.8ex; border-left: 1px solid rgb(204, 204, 204);
padding-left: 1ex;">
<pre class="k9mail">Hei Didier,
I guess you could use a python init function for the form in order to define "default values" (see: <a moz-do-not-send="true" href="http://nathanw.net/2011/09/05/qgis-tips-custom-feature-forms-with-python-logic">http://nathanw.net/2011/09/05/qgis-tips-custom-feature-forms-with-python-logic</a>/).
However, sounds like a useful enhancement of the Custom form functionality (at least I would be interested too)...
Cheers
Stefan
-----Original Message-----
From: <a class="moz-txt-link-abbreviated" href="mailto:qgis-user-bounces@lists.osgeo.org">qgis-user-bounces@lists.osgeo.org</a> [<a class="moz-txt-link-freetext" href="mailto:qgis-user-bounces@lists.osgeo.org">mailto:qgis-user-bounces@lists.osgeo.org</a>] On Behalf Of didier peeters
Sent: 26. juni 2015 10:08
To: qgis-user
Subject: [Qgis-user] Default values in form
Hello,
Simple question : is there a way to set a default value for an attribute in QGis ?
I have Postgis layers in QGis in which I’m inserting or updating data, and I would like that some fields would be filled automatically unless I fill
them myself. Well that’s the definition of a default value, and I don’t think that using layers stored in Postgis would make any difference.
Thanks
Didier
<hr>
Qgis-user mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Qgis-user@lists.osgeo.org">Qgis-user@lists.osgeo.org</a>
<a moz-do-not-send="true" href="http://lists.osgeo.org/mailman/listinfo/qgis-user">http://lists.osgeo.org/mailman/listinfo/qgis-user</a>
<hr>
Qgis-user mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Qgis-user@lists.osgeo.org">Qgis-user@lists.osgeo.org</a>
<a moz-do-not-send="true" href="http://lists.osgeo.org/mailman/listinfo/qgis-user">http://lists.osgeo.org/mailman/listinfo/qgis-user</a></pre>
</blockquote>
</div>
<br>
-- <br>
<a moz-do-not-send="true" href="http://faunalia.eu">http://faunalia.eu</a>/<br>
Sent from mobile, sorry for being short
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Qgis-user mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Qgis-user@lists.osgeo.org">Qgis-user@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/qgis-user">http://lists.osgeo.org/mailman/listinfo/qgis-user</a></pre>
</blockquote>
<br>
</body>
</html>