Attributes Form

‎フィールドに別名を追加する‎

‎通常、フィールド名はアクセント、スペースなしで定義され、長くすることはできません。 :menuselection:` レイヤープロパティ -->属性フォーム ` でフィールドをクリックすると、別名を追加できます。‎

‎これは、よりわかりやすい名前を使用して、可能な場合はフィールド名を置き換えるために使用されます。‎

:menuselection:` レイヤープロパティ -->ソースフィールド ` 、レイヤーに定義された別名のリストを使用できます。‎

編集フォームのカスタマイズ‎

‎ :menuselection:` レイヤープロパティ -->属性フォーム ` でフィールドをクリックすると、フォームを設定できます。‎

‎レイヤーフィールドの編集ツールを設定するには:‎

  • In Layer properties ‣ Attributes Form.

  • ‎左パネルの最初のフィールドを選択して、 ウィジェットの種類 を選択します。‎

    • ‎フィールドを非表示にするには、 非表示 を選択します。ユーザーはフォームにフィールドを表示しません。コンテンツは挿入されません。 主キーに使用します 。‎

    • ‎読み取り専用フィールドを追加するには、チェックを外します 編集可能 チェックボックスをオフにします。‎

    • Special case of the option Value Relation. You can use this option for a Lizmap map. For users to have access to information of the outer layer that contains the data, you must enable the publication of the layer as a WFS layer in Project properties ‣ QGIS Server ‣ WFS.

警告

‎Lizmap Webクライアントはフォーム生成のための "QT デザイナー UI ファイル" を認識しません。したがって、レイヤーを編集するには、 自動生成 モードまたは ドラッグアンドドロップ モードのみを使用してください。‎

注釈

‎フィールドを必須にするには、テーブルのプロパティで``NOT NULL``として定義する必要があります データベース内 で、ない QGIS -->レイヤープロパティ 。‎

注釈

‎すべての編集ツールは、まだ Lizmap ウェブクライアントによって管理されていません。以下のツールのみがサポートされています。‎

  • ‎テキスト編集‎

  • ‎分類‎

  • ‎範囲‎

  • ‎バリューマップ‎

  • 非表示

  • ‎チェック ボックス‎

  • ‎日付/時刻‎

  • ‎値の関係‎

  • ‎リレーション参照‎

‎ツールがサポートされていない場合、Web フォームにテキスト入力フィールドが表示されます。‎

‎高度なフォーム‎

注釈

To group fields in different tabs, follow the QGIS documentation about the drag and drop form.

lizmapは、QGISで設定されたいくつかの動作を再現することができます:‎

  • Control visibility by expression.

    For example, you can toggle tab's visibility based on a checkbox state.

    1. Create a field named has_photo defined as a Checkbox widget

    2. Create a photo tab having:

    • Control Visibility by Expression checked

    • Expression with "has_photo" = true OR "has_photo" = 't'

  • ‎** 式で定義された制約 **

    For example, you want to simply assert users correctly type a website URL beginning by http (of course, a regular expression would be better but we keep it simple).

    1. Create a field named website defined as a Text Edit widget

    2. Define the Constraints

    • Expression with left( "website", 4) = 'http'

    • Expression description with Web site URL must start with 'http'

  • ‎** 値の関係フィールドのフィルター式 **

    For example, you want a field to automatically get the related value from another layer's field when drawing a point on the map.

    1. Create a field name quartier (neighbourhood in French) defined as a Value Relation widget

    2. Set the parent layer to another layer quartiers

    3. Set Filter expression with intersects($geometry, @current_geometry)

    4. We can also check Not null and Enforce not null contraint to assert no NULL value can be set.

Tip

As shown in the video above, it's not possible anymore, natively, to have the combobox showing the area clicked automatically after the click on the map. The combobox has an empty value as a first item but has still a single value in the dropdown menu with the name of the neighbourhood clicked on the map.