diff --git a/src/layer/display-instructions/index.md b/src/layer/display-instructions/index.md index 8a709cf6..e10bc0b6 100644 --- a/src/layer/display-instructions/index.md +++ b/src/layer/display-instructions/index.md @@ -1,4 +1,6 @@ -# Display instructions in the form using Text and HTML widget +# How to Display Instructions in the Form +The HTML and Text widgets can be used to display instructions in the form, as described in [Informational Widgets ](../info-widgets/). + Sometimes, you may want to include instructions or tips for surveyors in your forms. offers Text and HTML widgets that can be used for this purpose. Your text instructions can include [expressions and field values](#using-expressions-in-text-and-html-widgets) as well. The HTML widget supports various [HTML tags](https://doc.qt.io/qt-6/richtext-html-subset.html#supported-tags), so it can be also used, for instance, to display [online images](#using-html-widget-to-display-online-images-and-other-online-resources). These widgets can be found in **Available Widgets** in the **Other Widgets** section when using the [Drag and Drop Designer](../form-layout/#qgis-drag-and-drop-designer). @@ -39,32 +41,3 @@ Clone to follow this examp ... and this is how it works during the field survey. `[% "VRP" %]` expression displays the current value of the `Vehicle Registration Plate` field. ![Mergin Maps mobile app text widget with variable](./mobile-text-widget-expression.jpg "Mergin Maps mobile app text widget with variable") -## Display online images and other online resources using HTML widget {#using-html-widget-to-display-online-images-and-other-online-resources} -The **HTML widget** can be also used to display online images in the mobile app or open online resources, such as PDF files, videos or websites, in the browser of your device. - -::: tip -Clone to how this works. -::: - -Here are HTML samples you can use to [configure the HTML widget](#using-expressions-in-text-and-html-widgets). Your form should contain a text field for storing the full URL link (here: `link`). - -To use these samples, replace `link` by the name of the appropriate field in your layer. - -- show image in the form - -```html - -``` - -- display a text (`here is your link`) with a link that can be opened in a browser -```html - -``` - -Make sure that the HTML widget works before taking it to the field by testing it in the . It should look something like this: - -![HTML widget in QGIS and in Mergin Maps mobile app](./qgis-mobile-html-form.jpg "HTML widget in QGIS and in Mergin Maps mobile app") - -::: warning Image preview in QGIS 3.36+ -QGIS may not display the preview of the online image if you use QGIS 3.36 or higher. Despite this behaviour, the displays it correctly. Therefore we recommend trying the setup by opening the form in the to make sure it works as intended. -::: diff --git a/src/layer/embed-image/index.md b/src/layer/embed-image/index.md index f22d3b90..c7d28ce1 100644 --- a/src/layer/embed-image/index.md +++ b/src/layer/embed-image/index.md @@ -1,28 +1,28 @@ -# Using HTML widget to display online images and other online resources -The **HTML widget** can be also used to display online images in the mobile app or open online resources, such as PDF files, videos or websites, in the browser of your device. +# How to Embed an Image +[[toc]] -::: tip + +## Photo +A photo can be displayed in the form as described in [Displaying photos in QGIS](../photos/#displaying-photos-in-qgis). + +## Online image +The [**HTML widget**](../info-widgets/) can be used to display online images in the as described in [Using HTML widget to display online images and other online resources ](../info-widgets/#using-html-widget-to-display-online-images-and-other-online-resources) + +::: tip Example project available Clone to how this works. ::: -Here are HTML samples you can use to configure the HTML widget. Your form should contain a text field for storing the full URL link (here: `link`). - -To use these samples, replace `link` by the name of the appropriate field in your layer. +Your layer should contain a text field for storing the full URL link (here: `link`). -- show image in the form +To show an online image in the form, configure the HTML widget with this expression (replace `link` with the name of the appropriate field in your layer): ```html ``` -- display a text (`here is your link`) with a link that can be opened in a browser -```html - -``` - Make sure that the HTML widget works before taking it to the field by testing it in the . It should look something like this: -value-re -![HTML widget in QGIS and in Mergin Maps mobile app](./qgis-mobile-html-form.jpg "HTML widget in QGIS and in Mergin Maps mobile app") + +![HTML widget in QGIS and in Mergin Maps mobile app](./qgis-mobile-html-form.webp "HTML widget in QGIS and in Mergin Maps mobile app") ::: warning Image preview in QGIS 3.36+ QGIS may not display the preview of the online image if you use QGIS 3.36 or higher. Despite this behaviour, the displays it correctly. Therefore we recommend trying the setup by opening the form in the to make sure it works as intended. diff --git a/src/layer/embed-image/mobile-forms-conditional-visibility.jpg b/src/layer/embed-image/mobile-forms-conditional-visibility.jpg deleted file mode 100644 index f2ce8450..00000000 Binary files a/src/layer/embed-image/mobile-forms-conditional-visibility.jpg and /dev/null differ diff --git a/src/layer/embed-image/mobile-forms-conditional-visibility.xcf b/src/layer/embed-image/mobile-forms-conditional-visibility.xcf deleted file mode 100644 index 53304a74..00000000 Binary files a/src/layer/embed-image/mobile-forms-conditional-visibility.xcf and /dev/null differ diff --git a/src/layer/embed-image/mobile-forms-layout.jpg b/src/layer/embed-image/mobile-forms-layout.jpg deleted file mode 100644 index 21025a25..00000000 Binary files a/src/layer/embed-image/mobile-forms-layout.jpg and /dev/null differ diff --git a/src/layer/embed-image/mobile-forms-layout.xcf b/src/layer/embed-image/mobile-forms-layout.xcf deleted file mode 100644 index 1c0e554a..00000000 Binary files a/src/layer/embed-image/mobile-forms-layout.xcf and /dev/null differ diff --git a/src/layer/embed-image/mobile-forms-open-file-html-widget.jpg b/src/layer/embed-image/mobile-forms-open-file-html-widget.jpg deleted file mode 100644 index cfdb4307..00000000 Binary files a/src/layer/embed-image/mobile-forms-open-file-html-widget.jpg and /dev/null differ diff --git a/src/layer/embed-image/mobile-forms-open-file-html-widget.xcf b/src/layer/embed-image/mobile-forms-open-file-html-widget.xcf deleted file mode 100644 index 0fa41723..00000000 Binary files a/src/layer/embed-image/mobile-forms-open-file-html-widget.xcf and /dev/null differ diff --git a/src/layer/embed-image/mobile-text-widget-expression.jpg b/src/layer/embed-image/mobile-text-widget-expression.jpg deleted file mode 100644 index 4215c32a..00000000 Binary files a/src/layer/embed-image/mobile-text-widget-expression.jpg and /dev/null differ diff --git a/src/layer/embed-image/mobile-text-widget-expression.xcf b/src/layer/embed-image/mobile-text-widget-expression.xcf deleted file mode 100644 index a3d95582..00000000 Binary files a/src/layer/embed-image/mobile-text-widget-expression.xcf and /dev/null differ diff --git a/src/layer/embed-image/qgis-add-group-tab.jpg b/src/layer/embed-image/qgis-add-group-tab.jpg deleted file mode 100644 index 9b1a3866..00000000 Binary files a/src/layer/embed-image/qgis-add-group-tab.jpg and /dev/null differ diff --git a/src/layer/embed-image/qgis-add-group-tab.xcf b/src/layer/embed-image/qgis-add-group-tab.xcf deleted file mode 100644 index 1be22c3a..00000000 Binary files a/src/layer/embed-image/qgis-add-group-tab.xcf and /dev/null differ diff --git a/src/layer/embed-image/qgis-configure-html-widget.jpg b/src/layer/embed-image/qgis-configure-html-widget.jpg deleted file mode 100644 index 1ce0853d..00000000 Binary files a/src/layer/embed-image/qgis-configure-html-widget.jpg and /dev/null differ diff --git a/src/layer/embed-image/qgis-configure-html-widget.xcf b/src/layer/embed-image/qgis-configure-html-widget.xcf deleted file mode 100644 index b8353f39..00000000 Binary files a/src/layer/embed-image/qgis-configure-html-widget.xcf and /dev/null differ diff --git a/src/layer/embed-image/qgis-configure-spacer-widget.jpg b/src/layer/embed-image/qgis-configure-spacer-widget.jpg deleted file mode 100644 index 6c1543b1..00000000 Binary files a/src/layer/embed-image/qgis-configure-spacer-widget.jpg and /dev/null differ diff --git a/src/layer/embed-image/qgis-configure-spacer-widget.xcf b/src/layer/embed-image/qgis-configure-spacer-widget.xcf deleted file mode 100644 index 8282cdc4..00000000 Binary files a/src/layer/embed-image/qgis-configure-spacer-widget.xcf and /dev/null differ diff --git a/src/layer/embed-image/qgis-configure-text-widget.jpg b/src/layer/embed-image/qgis-configure-text-widget.jpg deleted file mode 100644 index aeb75a7b..00000000 Binary files a/src/layer/embed-image/qgis-configure-text-widget.jpg and /dev/null differ diff --git a/src/layer/embed-image/qgis-configure-text-widget.xcf b/src/layer/embed-image/qgis-configure-text-widget.xcf deleted file mode 100644 index 9b3f2420..00000000 Binary files a/src/layer/embed-image/qgis-configure-text-widget.xcf and /dev/null differ diff --git a/src/layer/embed-image/qgis-drag-n-drop.gif b/src/layer/embed-image/qgis-drag-n-drop.gif deleted file mode 100644 index 466bbbc8..00000000 Binary files a/src/layer/embed-image/qgis-drag-n-drop.gif and /dev/null differ diff --git a/src/layer/embed-image/qgis-form-add-group.jpg b/src/layer/embed-image/qgis-form-add-group.jpg deleted file mode 100644 index 173d8bea..00000000 Binary files a/src/layer/embed-image/qgis-form-add-group.jpg and /dev/null differ diff --git a/src/layer/embed-image/qgis-form-add-group.xcf b/src/layer/embed-image/qgis-form-add-group.xcf deleted file mode 100644 index 717d31bc..00000000 Binary files a/src/layer/embed-image/qgis-form-add-group.xcf and /dev/null differ diff --git a/src/layer/embed-image/qgis-form-conditional-visibility.jpg b/src/layer/embed-image/qgis-form-conditional-visibility.jpg deleted file mode 100644 index 5efa9577..00000000 Binary files a/src/layer/embed-image/qgis-form-conditional-visibility.jpg and /dev/null differ diff --git a/src/layer/embed-image/qgis-form-conditional-visibility.xcf b/src/layer/embed-image/qgis-form-conditional-visibility.xcf deleted file mode 100644 index bbe88b03..00000000 Binary files a/src/layer/embed-image/qgis-form-conditional-visibility.xcf and /dev/null differ diff --git a/src/layer/embed-image/qgis-form-layout-add-groups-tabs.jpg b/src/layer/embed-image/qgis-form-layout-add-groups-tabs.jpg deleted file mode 100644 index f6be2f42..00000000 Binary files a/src/layer/embed-image/qgis-form-layout-add-groups-tabs.jpg and /dev/null differ diff --git a/src/layer/embed-image/qgis-form-layout-add-groups-tabs.xcf b/src/layer/embed-image/qgis-form-layout-add-groups-tabs.xcf deleted file mode 100644 index 176c400e..00000000 Binary files a/src/layer/embed-image/qgis-form-layout-add-groups-tabs.xcf and /dev/null differ diff --git a/src/layer/embed-image/qgis-form-open-file-html-widget.jpg b/src/layer/embed-image/qgis-form-open-file-html-widget.jpg deleted file mode 100644 index 19b2c1ec..00000000 Binary files a/src/layer/embed-image/qgis-form-open-file-html-widget.jpg and /dev/null differ diff --git a/src/layer/embed-image/qgis-form-open-file-html-widget.xcf b/src/layer/embed-image/qgis-form-open-file-html-widget.xcf deleted file mode 100644 index 2ee53c46..00000000 Binary files a/src/layer/embed-image/qgis-form-open-file-html-widget.xcf and /dev/null differ diff --git a/src/layer/embed-image/qgis-form-spacer-widget.jpg b/src/layer/embed-image/qgis-form-spacer-widget.jpg deleted file mode 100644 index 4f3cbc9e..00000000 Binary files a/src/layer/embed-image/qgis-form-spacer-widget.jpg and /dev/null differ diff --git a/src/layer/embed-image/qgis-form-spacer-widget.xcf b/src/layer/embed-image/qgis-form-spacer-widget.xcf deleted file mode 100644 index a91e9a9e..00000000 Binary files a/src/layer/embed-image/qgis-form-spacer-widget.xcf and /dev/null differ diff --git a/src/layer/embed-image/qgis-form-tabs-groups.jpg b/src/layer/embed-image/qgis-form-tabs-groups.jpg deleted file mode 100644 index af397540..00000000 Binary files a/src/layer/embed-image/qgis-form-tabs-groups.jpg and /dev/null differ diff --git a/src/layer/embed-image/qgis-form-tabs-groups.xcf b/src/layer/embed-image/qgis-form-tabs-groups.xcf deleted file mode 100644 index 3623e61c..00000000 Binary files a/src/layer/embed-image/qgis-form-tabs-groups.xcf and /dev/null differ diff --git a/src/layer/embed-image/qgis-form-text-html.jpg b/src/layer/embed-image/qgis-form-text-html.jpg deleted file mode 100644 index d387d1ea..00000000 Binary files a/src/layer/embed-image/qgis-form-text-html.jpg and /dev/null differ diff --git a/src/layer/embed-image/qgis-form-text-html.xcf b/src/layer/embed-image/qgis-form-text-html.xcf deleted file mode 100644 index 9e4b91a1..00000000 Binary files a/src/layer/embed-image/qgis-form-text-html.xcf and /dev/null differ diff --git a/src/layer/embed-image/qgis-form-value-map-roads.jpg b/src/layer/embed-image/qgis-form-value-map-roads.jpg deleted file mode 100644 index 7fbac56f..00000000 Binary files a/src/layer/embed-image/qgis-form-value-map-roads.jpg and /dev/null differ diff --git a/src/layer/embed-image/qgis-form-value-map-roads.xcf b/src/layer/embed-image/qgis-form-value-map-roads.xcf deleted file mode 100644 index a9a4663b..00000000 Binary files a/src/layer/embed-image/qgis-form-value-map-roads.xcf and /dev/null differ diff --git a/src/layer/embed-image/qgis-mobile-html-form.webp b/src/layer/embed-image/qgis-mobile-html-form.webp new file mode 100644 index 00000000..b33e038f Binary files /dev/null and b/src/layer/embed-image/qgis-mobile-html-form.webp differ diff --git a/src/layer/embed-image/qgis-mobile-html-form.xcf b/src/layer/embed-image/qgis-mobile-html-form.xcf index 0ae5097f..af9eda11 100644 Binary files a/src/layer/embed-image/qgis-mobile-html-form.xcf and b/src/layer/embed-image/qgis-mobile-html-form.xcf differ diff --git a/src/layer/embed-image/qgis-text-widget-expression.gif b/src/layer/embed-image/qgis-text-widget-expression.gif deleted file mode 100644 index 26bb6867..00000000 Binary files a/src/layer/embed-image/qgis-text-widget-expression.gif and /dev/null differ diff --git a/src/layer/embed-image/qgis_forms_layout.jpg b/src/layer/embed-image/qgis_forms_layout.jpg deleted file mode 100644 index ed35c767..00000000 Binary files a/src/layer/embed-image/qgis_forms_layout.jpg and /dev/null differ diff --git a/src/layer/embed-image/qgis_forms_layout.xcf b/src/layer/embed-image/qgis_forms_layout.xcf deleted file mode 100644 index 5a01c56b..00000000 Binary files a/src/layer/embed-image/qgis_forms_layout.xcf and /dev/null differ diff --git a/src/layer/embed-image/spacer-widget-forms.jpg b/src/layer/embed-image/spacer-widget-forms.jpg deleted file mode 100644 index 545a9ebc..00000000 Binary files a/src/layer/embed-image/spacer-widget-forms.jpg and /dev/null differ diff --git a/src/layer/embed-image/spacer-widget-forms.xcf b/src/layer/embed-image/spacer-widget-forms.xcf deleted file mode 100644 index 577fe798..00000000 Binary files a/src/layer/embed-image/spacer-widget-forms.xcf and /dev/null differ diff --git a/src/layer/external-link/index.md b/src/layer/external-link/index.md index 26c7c245..ea91e5dd 100644 --- a/src/layer/external-link/index.md +++ b/src/layer/external-link/index.md @@ -1,6 +1,8 @@ # How to Use Hyperlinks [[toc]] +Attributes forms can include clickable links that can be used to [open a link in a browser](#open-link-in-a-browser) or [open a navigation app](#open-link-to-a-navigation-app) directly from the form in . + ## Open link in a browser 1. Right-click on a layer, select **Properties** and go to the **Attributes form** tab. diff --git a/src/layer/one-to-n-relations/index.md b/src/layer/one-to-n-relations/index.md index 833884b8..07c95f12 100644 --- a/src/layer/one-to-n-relations/index.md +++ b/src/layer/one-to-n-relations/index.md @@ -1,19 +1,19 @@ # How to Link Multiple Records to One Feature [[toc]] -You can follow this example by cloning . - -:::tip -Make sure that your survey layer has a **unique UUID** field to correctly link records to the feature. You will find detailed steps how to set it up in [How to Attach Multiple Photos to Features](../attach-multiple-photos-to-features/) -::: - +It is often the case that you have a set of spatial features and you want to record their status every now and then. -It is often the case that you have a set of spatial features and you want to record their status every now and then. For example, there is a GIS layer representing the manholes and the surveyors carry out regular inspections of the manholes using . Instead of duplicating the manhole layer and recording each inspection as a new feature, inspections can be recorded in a non-spatial table that is linked to the spatial layer. This way, multiple records can be linked to one feature. +For example, there is a GIS layer representing the manholes and the surveyors carry out regular inspections of the manholes using . Instead of duplicating the manhole layer and recording each inspection as a new feature, inspections can be recorded in a non-spatial table that is linked to the spatial layer. This way, multiple records can be linked to one feature as a [one to many relation](../relations/). The image below shows the manhole locations and a form with listed inspections in . ![Multiple inspections linked to one point in Mergin Maps mobile app](./mobile-1-n-relation.jpg "Multiple inspections linked to one point in Mergin Maps mobile app") + +:::tip Example project available +You can follow this example by cloning . +::: + The manhole point layer has the following attribute table: | fid | Manhole | Manhole UUID | @@ -22,7 +22,7 @@ The manhole point layer has the following attribute table: | 2 | 2 | `{be01b98f-3585-49d4-be74-4cf3530a2989}` | | 3 | 3 | `{03178264-0070-45c8-a981-b2474627d7e0}` | -This layer contains only information about the manholes. `Manhole UUID` values are generated using [`uuid()` function as a default value](../attach-multiple-photos-to-features/) when a feature is created. This ensures that these values are **unique** even when multiple surveyors capture new features at the same time. This field will be used to link inspections and manholes. +This layer contains only information about the manholes. `Manhole UUID` values are generated using the [`uuid()` function](../relations/#generating-unique-ids-uuid) when a feature is created. This ensures that these values are **unique** even when multiple surveyors capture new features at the same time. This field will be used to link inspections and manholes. :::danger Using UUID **Why UUID?** FID can be changed during [synchronisation](../../manage/synchronisation/). As a result, records can end up being linked to wrong features. diff --git a/src/layer/open-file/index.md b/src/layer/open-file/index.md index 8ed5ce0e..9eba18fe 100644 --- a/src/layer/open-file/index.md +++ b/src/layer/open-file/index.md @@ -1,14 +1,17 @@ # How to Open a File +[[toc]] A local file, e.g. a PDF stored in the project folder, can be opened from within the form. This can be achieved by using [the HTML widget](#using-html-widget-to-open-local-files) or setting up [default values](#open-local-files-using-default-values). -In the public project, both alternatives are used. You can download or clone this project, to compare them and see what works the best for you. +::: tip Public project available +Download or clone our public project to explore both options and see what works the best for you. +::: ## Using HTML widget to open local files -The HTML widget can also be used to open local files: for instance, a locally stored PDF file can be opened from within the form during the survey. +The HTML widget can be used to open local files: for instance, a locally stored PDF file can be opened from within the form during the survey. ::: tip Example project available -There is a public project you can download or clone to see how the setup works. +This setup is used in our public project . ::: - A PDF file named `my-pdf.pdf` is stored in the main [project folder](../../manage/project/#mergin-maps-project-folder) as it needs to be packaged with the project. @@ -27,7 +30,7 @@ In the , you can tap the *Open File* link to open the PDF Default values can also be used to open local files (e.g. a PDF file) from within the form. This file needs to be packaged with the project, so it should be stored somewhere in the [project folder](../../manage/project/#mergin-maps-project-folder). ::: tip Example project available -There is a public project you can download or clone to see how the setup works. +This setup is used in our public project . ::: - A PDF file named `my-pdf.pdf` is stored in the main project folder.