From 0199b29df3922edca955fa07fa5391730e3c0f71 Mon Sep 17 00:00:00 2001 From: Raju Udava <86527202+dstala@users.noreply.github.com> Date: Wed, 3 Apr 2024 01:33:14 +0000 Subject: [PATCH 1/2] docs: prefill --- .../docs/090.views/040.view-types/030.form.md | 28 ++++++++++++------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/packages/noco-docs/docs/090.views/040.view-types/030.form.md b/packages/noco-docs/docs/090.views/040.view-types/030.form.md index df09826fca..a4b4c77977 100644 --- a/packages/noco-docs/docs/090.views/040.view-types/030.form.md +++ b/packages/noco-docs/docs/090.views/040.view-types/030.form.md @@ -111,14 +111,22 @@ For select based field types, you can configure the options layout to be display ![Options Layout](/img/v2/views/form-view/options-layout.png) ## Prefill Form Fields -Prefilling form fields is a way to pre-populate form fields with default values. This can be useful when you want to save time for users by prefilling some fields with default values. The prefilled fields and their values are visible in the URL of the form view & can be manually constructed by ensuring URL parameters are appropriately encoded. +Here's a more professional rephrasing of the given content: + +## Pre-Filling Form Fields +NocoDB offers a convenient feature that allows pre-filling form fields with specific values by setting URL parameters. This functionality enables the creation of custom URLs with desired field values, streamlining data entry and enhancing user experience. + +To construct a pre-filled form URL manually, ensure that the URL parameters are appropriately encoded in the following format: `?key1=value1&key2=value2`. + +For instance, the URL `https://wh8s5w.noco.to/#/nc/form/66da06-f074-47af-ace7-fde46df55?Status=Qualification&Priority=Very+high` pre-fills the `Status` field with `Qualification` and the `Priority` field with `Very high`. + +NocoDB provides an intuitive alternative approach to generate pre-filled URLs through the form builder. +1. Open the form builder and pre-fill the required form fields with the desired values. +2. Click on the `Share` button located in the top right corner. +3. Toggle the `Enable Public Viewing` button to enable sharing. +4. Toggle the `Enable Prefill` button to enable pre-filling. +5. Click on the `Copy Link` button to copy the pre-filled URL. -NocoDB provides an easier approach to construct prefilled URLs. One can use the form builder to prefill form fields with default values & auto-generate encoded prefilled URL. Follow the below steps to prefill form fields & generate a prefilled URL - -1. Open the form builder, prefill the required form fields with default values. -2. Click on the `Share` button in the top right corner. -3. Toggle `Enable Public Viewing` button to enable share. -4. Toggle `Enable Prefill` button to enable prefill. -5. Click on the `Copy Link` button to copy the link. ![Prefill](/img/v2/views/form-view/prefill.png) ![Prefill share](/img/v2/views/form-view/prefill-share.png) @@ -129,15 +137,15 @@ NocoDB provides an easier approach to construct prefilled URLs. One can use the ::: ### Prefill modes -1. **Default**: Standard mode. This mode will prefill the form fields with the default values set in the form builder. Users can edit the prefilled fields. When shared, the prefilled fields will be visible in the URL. In the image below, the `Number` field is prefilled with the value `1234`, `Currency` field is prefilled with the value `1000` and `Year` field is prefilled with value `2023`. +1. **Default**: Standard mode. This mode will prefill the form fields with the values set in the shared form URL. Users can edit the prefilled fields in the form. In the image below, the `Number` field is prefilled with the value `1234`, `Currency` field is prefilled with the value `1000` and `Year` field is prefilled with value `2023`. ![Prefill default](/img/v2/views/form-view/prefill-default.png) -2. **Hide prefilled fields**: This mode will prefill the form fields with the default values set in the form builder but will hide the prefilled fields from the user. When shared, the prefilled fields will be visible in the URL. In the image below, the `Number` field is prefilled with the value `1234`, `Currency` field is prefilled with the value `1000` and `Year` field is prefilled with value `2023`. +2. **Hide prefilled fields**: This mode will prefill the form fields with the values set in the shared form URL but will hide the prefilled fields in the form from the user. In the image below, the `Number` field is prefilled with the value `1234`, `Currency` field is prefilled with the value `1000` and `Year` field is prefilled with value `2023`. ![Prefill hide](/img/v2/views/form-view/prefill-hide.png) -3. **Lock prefilled fields as read-only**: This mode will prefill the form fields with the default values set in the form builder and will lock the prefilled fields as read-only. When shared, the prefilled fields will be visible in the URL. In the image below, the `Number` field is prefilled with the value `1234`, `Currency` field is prefilled with the value `1000` and `Year` field is prefilled with value `2023`. +3. **Lock prefilled fields as read-only**: This mode will prefill the form fields with the values set in the shared form URL and will lock the prefilled fields as read-only. In the image below, the `Number` field is prefilled with the value `1234`, `Currency` field is prefilled with the value `1000` and `Year` field is prefilled with value `2023`. ![Prefill lock](/img/v2/views/form-view/prefill-lock.png) From 445c16c172672292546deceaab65f2c33f16d7b4 Mon Sep 17 00:00:00 2001 From: Pranav C Date: Wed, 3 Apr 2024 14:39:46 +0530 Subject: [PATCH 2/2] docs: typo correction Signed-off-by: Pranav C --- .../noco-docs/docs/090.views/040.view-types/030.form.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/noco-docs/docs/090.views/040.view-types/030.form.md b/packages/noco-docs/docs/090.views/040.view-types/030.form.md index a4b4c77977..cb0db7cb4f 100644 --- a/packages/noco-docs/docs/090.views/040.view-types/030.form.md +++ b/packages/noco-docs/docs/090.views/040.view-types/030.form.md @@ -32,7 +32,7 @@ Form view builder layout can be divided into 4 sections: In the **Form View** area, click on in input boxes provided for **Title** & **Description** to add/update title & description to the form. :::info -Formatting options are supported for the description field. You can also use markdown to format the text. +Formatting options are supported for the description field. You can also use Markdown to format the text. ::: ![Form Title & Description](/img/v2/views/form-view/title-description.png) @@ -80,19 +80,19 @@ NocoDB allows you to configure the form view to perform various actions after a ![Form View Settings](/img/v2/views/form-view/post-submit-settings.png) :::info -Formatting options are supported for the `After Submit Message` field. You can also use markdown to format the text. +Formatting options are supported for the `After Submit Message` field. You can also use Markdown to format the text. ::: ## Field configuration To change the field label displayed on the form & add help-text, click on the required field in the **Form Area** and on the right side configuration panel, configure -1. **Label** `Opitonal` : Defaults to the field name. This doesn't affect the field name in the table. +1. **Label** `Optional` : Defaults to the field name. This doesn't affect the field name in the table. 2. **Help Text** `Optional` 3. **Required** : Toggle to mark the field as required ![Field Label & Help Text](/img/v2/views/form-view/field-config.png) :::info -Formatting options are supported for the `Help Text` field. You can also use markdown to format the text. +Formatting options are supported for the `Help Text` field. You can also use Markdown to format the text. ::: ### Field Type Specific Settings