> For the complete documentation index, see [llms.txt](https://docs.quantumbyte.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.quantumbyte.ai/home/quantumbyte-v2.0/2.builder/1.frontend/1.started/1.simple_layanan.md).

# Create Form Service

In this tutorial, we'll guide you through creating a form service, from building an engaging frontend to setting up an efficient backend and connecting it with an API.

### Developer Page

Follow these steps to configure the line chart:

\
Click the gear icon on the line chart widget.

<figure><img src="/files/wL4G43OeIZhWlOSlpn8D" alt=""><figcaption></figcaption></figure>

***

### Frontend

### Create Service

1. Click the **Create Service** button.
2. Enter the service title, description, and category as shown in the example below.

   <figure><img src="/files/0ubAYqtflQSLcOiVmpVZ" alt=""><figcaption></figcaption></figure>

***

### Adding a Page

1. To add a new page, click **Add Page** in the bottom-right corner.
2. Enter a title for the page — in this case, we’ll use **“Form”** as the title.

   <figure><img src="/files/QLo6ciWTyzTI7lZ9bDMU" alt=""><figcaption></figcaption></figure>
3. Select **Blank Page**.
4. The new page will appear on the right side of the page list.

   <figure><img src="/files/izGAyLHsQLsj4tS5PxON" alt=""><figcaption></figcaption></figure>
5. Click **Save** on the Developer Page to store all configurations.

***

### Widget Configuration

To make your app’s interface more engaging, you can use various widgets. In this tutorial, we will use the **Text widget** for service titles and descriptions, and the **ListView widget** to create menus within the service.

#### Steps to add widgets

1. Drag and drop the Text widget and ListView widget onto the main page.

   <figure><img src="/files/Q1Pj4TvLbUtqNHeoRcop" alt=""><figcaption></figcaption></figure>
2. Add other widgets as needed.

***

#### Widget Text Configuration

1. Click or select the gear icon on the Text widget.

   <figure><img src="/files/Z6DEStrkvgYnezo6c8uQ" alt=""><figcaption></figcaption></figure>
2. A configuration panel for the Text widget will appear.

   <figure><img src="/files/hZuSSTcMwLnSzFnUHuGl" alt=""><figcaption></figcaption></figure>
3. Enter a **title** with any text, in this example, the title is “Demo Service.”

   <figure><img src="/files/bq4Nrig9RC5YHKxkkEcB" alt=""><figcaption></figcaption></figure>
4. Enter a **description** for the title.

   <figure><img src="/files/Oxj1R13T2WHXuEcFUap2" alt=""><figcaption></figcaption></figure>
5. Configure these parts.

   <figure><img src="/files/fKAitJ8CySiJH5bvVqnX" alt=""><figcaption></figcaption></figure>

<details>

<summary>Configuration Guide</summary>

* **Max Characters (Desc):** The maximum number of characters displayed in the “Description” field of the Text widget.
* **Icon:** Option to upload or select an icon to display with the Text widget.
* **Icon Size:** Option to set the size of the icon.
* **Title Font Size:** Option to set the font size for the widget title or label.
* **Desc Font Size:** Option to set the font size for the description or additional information.

</details>

5. Don’t forget to **save** your changes in the developer panel to ensure all configurations are stored.

<figure><img src="/files/XbdoPulbQprTimgRwR13" alt=""><figcaption></figcaption></figure>

6. Here's a preview of the text widget in your app:

* Web Version

<figure><img src="/files/WwbGg0WmcopCvoTJ6owR" alt=""><figcaption></figcaption></figure>

* Mobile Version

<figure><img src="/files/WEysykZrluNX0tJU1UfG" alt=""><figcaption></figcaption></figure>

After you download your app, install it, and enter your service code.

<figure><img src="/files/4hjbxPbWmPtY7f2u2igj" alt=""><figcaption></figcaption></figure>

This is how your finished mobile app will look.

<figure><img src="/files/SG7KntaahskWGkqcPZ2m" alt=""><figcaption></figcaption></figure>

***

#### ListView Widget Configuration

We'll use the Listview Widget to create a navigation menu that links to your forms.

1. Click the **gear icon** on the Text Widget.

   <figure><img src="/files/nR05NvE86nAgRS8I84W5" alt=""><figcaption></figcaption></figure>
2. The widget's configuration panel will open.

   <figure><img src="/files/SJUXeLlALmsYh0dcPnrB" alt=""><figcaption></figcaption></figure>
3. Click **Add Listview Item**.
4. A new section will appear for you to configure the list item.

   <figure><img src="/files/eVzYct5nz332Wf2OFTce" alt=""><figcaption></figcaption></figure>
5. Set the title to "Submit Form."

   <figure><img src="/files/bMUmbDBZAySJhOZbhmg3" alt=""><figcaption></figcaption></figure>
6. Enter a title description in the "Description" field.

   <figure><img src="/files/M0WWmYgpvICY0qZwXaet" alt=""><figcaption></figcaption></figure>
7. Customize the other settings like the image, background color, and text color, as shown below.

   <figure><img src="/files/3pu6bga8rIQ6O9wBSVVt" alt=""><figcaption></figcaption></figure>
8. Turn on the "**Enable action on Click**" option.

   <figure><img src="/files/FgT1g6C9EaCzowUQlF6N" alt=""><figcaption></figcaption></figure>
9. Set the "onClick" method to "Open Pages" and select your "Formulir" page.

   <figure><img src="/files/mI8EVSAdblRNcIHK1gIY" alt=""><figcaption></figcaption></figure>
10. Click **Save** to confirm your settings.
11. To preview, go to the preview mode and select your service, named "Demo Layanan".
12. Remember to **Save** your work on the development page to keep all changes.

    <figure><img src="/files/TIryyNPMIA43A65jCdco" alt=""><figcaption></figcaption></figure>
13. Here is a preview of the Listview widget in the app:

<figure><img src="/files/toq6Nd24elIya3hkFe6C" alt=""><figcaption></figcaption></figure>

***

#### Widget Form Configuration

Previously, we created a page for our form. We've set up a Listview widget as a navigation menu, so clicking an item will open the form page. However, we haven't added the actual form to that page yet.

In this tutorial, we'll use the Form Widget to create a complaint form with the following fields:

1. Complaint Type (jenis\_pengaduan)
2. Description (keterangan)
3. Address (alamat)
4. Photo (foto)

#### Frontend Form Configuration

Follow the steps below to add and configure the form widget:

1. On the service developer page, click on your Formulir page.

   <figure><img src="/files/3rnsXm9yqXWfnkQnyqpJ" alt=""><figcaption></figcaption></figure>
2. Add a form widget to the page by dragging and dropping it.

   <figure><img src="/files/Xtnye7zsvREYqvCV3Rgo" alt=""><figcaption></figcaption></figure>
3. Once added, click the gear icon on the form widget.

   <figure><img src="/files/rMdGXwrxllbY1jvldiGm" alt=""><figcaption></figcaption></figure>
4. The widget configuration panel will appear.

   <figure><img src="/files/okmAjQn0RrN8yx7hW6cj" alt=""><figcaption></figcaption></figure>
5. Click "**Tambah Formulir**" (Add Form).
6. An additional configuration panel will appear.

   <figure><img src="/files/kBbNTMM9CdHVJIWAIxx5" alt=""><figcaption></figcaption></figure>
7. Click "Tambah Bidang" (Add Field).
8. A new field section will be added.

   <figure><img src="/files/DRjnaDYLN9hRD64NV3jB" alt=""><figcaption></figcaption></figure>
9. Click on the new field to open its settings.

   <figure><img src="/files/K7yfpjt9uBDA6Opn4PXW" alt=""><figcaption></figcaption></figure>
10. In the **Label** section, enter "**Jenis Pengaduan**" (Complaint Type).
11. Click "**Setup Komponen**" to configure the form field.
12. The form configuration panel will appear.

    <figure><img src="/files/3fVNcgmoInRSuxfFORiZ" alt=""><figcaption></figcaption></figure>
13. Set the form type. For this, select "Standart Form".
14. Choose "**Select**" and then "**Statis**" (Static).

    <figure><img src="/files/PxaRWkdJMaiVWXErGU0g" alt=""><figcaption></figcaption></figure>
15. In the options column, enter the complaint types as shown below.

    <figure><img src="/files/tSNX4bXnlar0yAY41tQh" alt=""><figcaption></figcaption></figure>
16. Click the "**Next**" button in the bottom right corner.

    <figure><img src="/files/LKiZPG93Ro0jE4OTWIur" alt=""><figcaption></figcaption></figure>
17. The validation settings will appear. Just click "**Next**" to continue.

    <figure><img src="/files/UAOhj9Z0kkS45Lhw3X90" alt=""><figcaption></figcaption></figure>
18. The data processing settings will appear. Click "**Save**" to finish.

    <figure><img src="/files/FvluqnT1vF73MZpxjWle" alt=""><figcaption></figcaption></figure>
19. Great! You have successfully configured the "Jenis Pengaduan" field.
20. Now, let's add the "**Keterangan**" (Description) field.
21. Click "**Tambah Bidang**" (Add Field) again.
22. Click on the new field you just added.
23. In the Label section, enter "**Keterangan**".

    <figure><img src="/files/z6D6TT7svivnx6zvG7BU" alt=""><figcaption></figcaption></figure>
24. Click "**Setup Komponen**" to configure it.
25. Set the form type to "**Standart Form**".
26. Select "**Textarea**".

    <figure><img src="/files/pGMcfarR8HGaO4Sxtb0y" alt=""><figcaption></figcaption></figure>
27. Click the "**Next**" button.
28. On the validation screen, click "**Next**".
29. On the data processing screen, click "**Save**".
30. Now, let's add the "**Alamat**" (Address) field.
31. Click "**Tambah Bidang**" (Add Field).
32. Click on the new field.
33. In the **Label** section, enter "**Alamat**".

    <figure><img src="/files/IgvMXJ0198brig7r9W9e" alt=""><figcaption></figcaption></figure>
34. Click "**Setup Komponen**".
35. Set the form type to "**Standart Form**".
36. Select "**Textarea**".

    <figure><img src="/files/XbjXgaXudJElF6LNrVFC" alt=""><figcaption></figcaption></figure>
37. Click "**Next**".
38. On the validation screen, click "**Next**".
39. On the data processing screen, click "**Save**".
40. Finally, let's add the "Foto" (Photo) field.
41. Click "Tambah Bidang" (Add Field).
42. Click on the new field.
43. In the Label section, enter "Foto".
44. Click "Setup Komponen".

    <figure><img src="/files/8exozq3cj1pXqahIlbrH" alt=""><figcaption></figcaption></figure>
45. Set the form type to "**Kamera**" (Camera).
46. Select "**Kamera + Galeri**" (Camera + Gallery).
47. Click "**Next**".

    <figure><img src="/files/NDj8o20I6tPsOntIis1i" alt=""><figcaption></figcaption></figure>
48. On the validation screen, click "**Next**".
49. On the data processing screen, click "**Save**".
50. Perfect! You have now set up all the required fields for the user form.

    <figure><img src="/files/ULkubzSmwNuR06RbDI9k" alt=""><figcaption></figcaption></figure>
51. Save the entire form by clicking the "**Simpan Formulir**" (Save Form) button on the right.

    <figure><img src="/files/eVCBzUPQphyFTtxKpfnc" alt=""><figcaption></figcaption></figure>
52. The following screen will appear.

    <figure><img src="/files/4DkOLoOIXZl1gxX05AWF" alt=""><figcaption></figcaption></figure>
53. Don't forget to give your form a name. For this example, name it "Form Pengaduan" (Complaint Form).

    <figure><img src="/files/yX4SGzH1CdLDp7nwlqDg" alt=""><figcaption></figcaption></figure>
54. Click "**Simpan Sekarang**" (Save Now) to confirm.
55. Finally, remember to **Save** the entire developer page to ensure all your configurations are stored.

    <figure><img src="/files/8xlLwmZmhVA6zZqERHX3" alt=""><figcaption></figcaption></figure>

#### Backend Form Configuration

You can add an advanced form to your existing frontend form. This form will only be visible in the backend and is typically used to add a "Status" field to track submissions (e.g., **PENDING**, **IN PROGRESS**, **APPROVED**, **REJECTED**, **COMPLETED**).

Follow these steps to add and configure the backend form widget:

1. Go to the Formulir page in your service's developer area.

   <figure><img src="/files/26z5DERSWcPCBrWhfzlN" alt=""><figcaption></figcaption></figure>
2. On the form widget, click the gear icon to configure it.

   <figure><img src="/files/tWNV33x0rjtYGuzn9crb" alt=""><figcaption></figcaption></figure>
3. Click "**Tambah Formulir**" (**Add Form**) at the bottom.

   <figure><img src="/files/7hDkItLH7aTVzferbyly" alt=""><figcaption></figcaption></figure>
4. Click "**Tambah Bidang**" (**Add Field**).

   <figure><img src="/files/HXALrUMkkDhxGGc0mGKT" alt=""><figcaption></figcaption></figure>
5. A new field section will appear.
6. Click on the new field to open its settings.

   <figure><img src="/files/hORE21uG7icOxgtwSojV" alt=""><figcaption></figcaption></figure>

   <figure><img src="/files/vJZdOHhwblnBfMKqGRyD" alt=""><figcaption></figcaption></figure>
7. In the Label section, enter "Status".

   <figure><img src="/files/vJZdOHhwblnBfMKqGRyD" alt=""><figcaption></figcaption></figure>
8. Click "setup komponen" to configure this field.
9. The form configuration panel will appear.

   <figure><img src="/files/HqobeYitw9IJPQ1wteG2" alt=""><figcaption></figcaption></figure>
10. Set the form type to "**Standart Form**".
11. Choose "**Select**" and then "**Statis**" (Static).
12. In the options column, enter the status values (e.g., Pending, In Progress).

    <figure><img src="/files/64zGCVcBpxnk3FwWVE7x" alt=""><figcaption></figcaption></figure>
13. Click the "**Next**" button in the bottom right.
14. The validation settings will appear. Just click "**Next**" to continue.

    <figure><img src="/files/LKZiDy78kgRJQHrSWYL2" alt=""><figcaption></figcaption></figure>
15. The data processing settings will appear. Click "**Save**" to finish.

    <figure><img src="/files/aH68bT9FVu6wPYY9HbTd" alt=""><figcaption></figcaption></figure>
16. Congratulations! You have successfully configured the backend form field.

    <figure><img src="/files/IgMyAznu0uAKrXiELISg" alt=""><figcaption></figcaption></figure>
17. Next, click "**simpan formulir**" (Save Form), then click "**simpan sekarang**" (Save Now).
18. Finally, remember to **Save** the entire developer page to ensure all your configurations are stored.

    <figure><img src="/files/CGkfLsbkce2RE8zxfjHE" alt=""><figcaption></figcaption></figure>

***

#### Mobile Display Configuration

You can configure how submitted forms appear in the user's transaction history on the mobile app.

Here is an example of what the user's transaction list looks like on mobile:

<figure><img src="/files/x7mzry7fZEroKzCugERo" alt=""><figcaption></figcaption></figure>

Here is an example of the transaction detail view on mobile:

<figure><img src="/files/2BX6lRgUToVmyC79zgHs" alt=""><figcaption></figcaption></figure>

Oke mari kita lakukan konfigurasi, ikuti langkah dibawah ini:

1. Go to your form page.
2. Click the gear icon on the form widget.
3. Click "**Simpan Formulir**" (Save Form) at the bottom.
4.

```
An additional configuration panel will appear.
```

```
<figure><img src="/files/KbZQwhJC2KTFxLY9PPxF" alt=""><figcaption></figcaption></figure>

<figure><img src="https://github.com/QTN-DEV/quantumbyte-doc/blob/main/.gitbook/assets/Screen%20Shot%202024-06-20%20at%2016.56.39.jpg" alt=""><figcaption></figcaption></figure>
```

5\.  Select the "**Konfigurasi App Mobile**" (Mobile App Config) sub-menu.

```
<figure><img src="/files/twJLjptt3UPIrwqZqyuP" alt=""><figcaption></figcaption></figure>

<figure><img src="https://github.com/QTN-DEV/quantumbyte-doc/blob/main/.gitbook/assets/Screen%20Shot%202024-06-20%20at%2016.59.57.jpg" alt=""><figcaption></figcaption></figure>
```

6\.  The mobile configuration panel will open.

```
<figure><img src="/files/o6w2BYjc69DuWyPKzckQ" alt=""><figcaption></figcaption></figure>

<figure><img src="https://github.com/QTN-DEV/quantumbyte-doc/blob/main/.gitbook/assets/screencapture-ina-digital-govtechindonesia-id-dev-layanan-EP4AzWYW4Ox5E6Zbwjlg-dev-2024-06-20-17_02_20.png" alt=""><figcaption></figcaption></figure>
```

7\. In the "**Judul**" (Title) field, select the `jenis_pengaduan` field.
8\. In the "**Deskripsi**" (Description) field, select the `keterangan` field.
9\. In the "**Status**" field, select the `status` field.
10\. Once these fields are set, click "**Simpan Sekarang**" (Save Now) at the bottom.
11\. Save the main developer page to store all your configurations.

```
<figure><img src="/files/4yGJV4lnwdoKSFLOvltO" alt=""><figcaption></figcaption></figure>
```

{% hint style="info" %}
Up to this the frontend configuration is completed.
{% endhint %}

***

### Backoffice/Backend

In the backoffice/backend section, you can directly monitor and manage your data. It provides widgets and components that you can configure to fit your specific monitoring and management needs.

Here is an example of a data monitoring dashboard, built using the available backoffice widgets.

<figure><img src="/files/rlJRO0di1asm5zID4gdz" alt=""><figcaption></figcaption></figure>

Here is an example of a data management dashboard, also built using the available backoffice widgets.

<figure><img src="/files/79Kl5Knk63TjwMCD9n76" alt=""><figcaption></figcaption></figure>

***

### Dashboard Monitoring

To monitor data, you'll often need various types of charts. The backoffice includes chart widgets to help you build a monitoring dashboard. In this guide, we will use the counter, line, and bar chart widgets.

***

#### Add Widget

Here are the steps to add chart widgets:

1. On the developer page, click the Backoffice sub-menu to enter the backend developer area.

   <figure><img src="/files/v8UFelBPb1AiG5ZA4k2k" alt=""><figcaption></figcaption></figure>

   <figure><img src="https://github.com/QTN-DEV/quantumbyte-doc/blob/main/.gitbook/assets/Screen%20Shot%202024-06-21%20at%2014.56.50.jpg" alt=""><figcaption></figcaption></figure>
2. Click "**Tambah Widget**" (Add Widget).

   <figure><img src="/files/fYKOkTNF9V5GMYcePZfn" alt=""><figcaption></figcaption></figure>

   <figure><img src="https://github.com/QTN-DEV/quantumbyte-doc/blob/main/.gitbook/assets/Screen%20Shot%202024-06-21%20at%2014.58.07.jpg" alt=""><figcaption></figcaption></figure>
3. Click "**Chart**".

   <figure><img src="/files/VcdDSQy56KGEdbFkL7z1" alt=""><figcaption></figcaption></figure>

   <figure><img src="https://github.com/QTN-DEV/quantumbyte-doc/blob/main/.gitbook/assets/Screen%20Shot%202024-06-21%20at%2014.59.55.jpg" alt=""><figcaption></figcaption></figure>
4. Click **"Counter"** to add a counter-style chart.
5. Click **"Line"** to add a line chart.
6. Click **"Bar"** to add a bar chart.
7. Click **"Save"** to store the components you've added.

***

#### Chart Widget Configuration

We've successfully added the chart widgets. In this tutorial, let's configure each chart we added.

***

#### Chart Configuration - Counter

Follow the steps below to configure the Counter Chart:

1. Click the gear icon on the counter chart widget.

   <figure><img src="/files/pFmtm7aA3GoAMZ3VMQD9" alt=""><figcaption></figcaption></figure>

   <figure><img src="https://github.com/QTN-DEV/quantumbyte-doc/blob/main/.gitbook/assets/Screen%20Shot%202024-06-21%20at%2016.22.28%20(1).jpg" alt=""><figcaption></figcaption></figure>
2. The configuration panel will appear.

   <figure><img src="/files/pwxxVcu3e5fB4L0q2DkT" alt=""><figcaption></figcaption></figure>

   <figure><img src="https://github.com/QTN-DEV/quantumbyte-doc/blob/main/.gitbook/assets/Screen%20Shot%202024-06-21%20at%2015.03.54%20(1).jpg" alt=""><figcaption></figcaption></figure>
3. In the "Pilih source data" field, select "dev".

   <figure><img src="/files/4vC8QABPLPgKjNwfvOdK" alt=""><figcaption></figcaption></figure>
4. In the "Pilih data" field, select the form you created earlier, in this case, "Form Pengaduan" (Complaint Form).

   <figure><img src="/files/f6VnunkrTBoumjLcQ2zH" alt=""><figcaption></figcaption></figure>
5. In the "Metric" section, set the aggregate function to "count".

   <figure><img src="/files/3SG5rXqrKAemTokg6tnr" alt=""><figcaption></figcaption></figure>
6. In the "Label" field, enter the text "Jumlah Pengaduan" (Total Complaints).

   <figure><img src="/files/JYWcpZt6DUPR5XRfeIkF" alt=""><figcaption></figcaption></figure>
7. In the "Buckets" section, select the field to aggregate. Here, choose "\_layanan.title".

   <figure><img src="/files/2pyvZICs1AGRwXAA7BsW" alt=""><figcaption></figcaption></figure>
8. Click "Simpan" (Save) to save this configuration.

   <figure><img src="/files/qe35umme3fL3qrJ91Dss" alt=""><figcaption></figcaption></figure>
9. Finally, remember to Save the main developer page to ensure all your settings are stored.

   <figure><img src="/files/otjjY4fvCj0EtBOFgUi2" alt=""><figcaption></figcaption></figure>

   <figure><img src="https://github.com/QTN-DEV/quantumbyte-doc/blob/main/.gitbook/assets/Screen%20Shot%202024-06-21%20at%2016.20.25.jpg" alt=""><figcaption></figcaption></figure>

***

#### Chart Configuration - Line

Follow these steps to configure the line chart:

1. Click the gear icon on the line chart widget.

   <figure><img src="/files/cSLDwZkxkW49mnNTQFma" alt=""><figcaption></figcaption></figure>

   <figure><img src="https://github.com/QTN-DEV/quantumbyte-doc/blob/main/.gitbook/assets/Screen%20Shot%202024-06-21%20at%2016.24.36%20(1).jpg" alt=""><figcaption></figcaption></figure>
2. The configuration panel will open.

   <figure><img src="/files/wBTZPQr08RHXiGOCSSdL" alt=""><figcaption></figcaption></figure>

   <figure><img src="https://github.com/QTN-DEV/quantumbyte-doc/blob/main/.gitbook/assets/Screen%20Shot%202024-06-21%20at%2016.26.30.jpg" alt=""><figcaption></figcaption></figure>
3. For the data source, select "dev".

   <figure><img src="/files/LGRVaLnHtfyaBKNXhpIP" alt=""><figcaption></figcaption></figure>
4. For the data selection, choose the form you created earlier: "Form Pengaduan".

   <figure><img src="/files/hnbxrl18FBFKA2J4lbxm" alt=""><figcaption></figcaption></figure>
5. Set the metric to "count".

   <figure><img src="/files/EAoLDqLfnLKxnGDtGq1n" alt=""><figcaption></figcaption></figure>
6. For the label, enter: "Jumlah Pengaduan /Hari" (Daily Complaints).

   <figure><img src="/files/hnubJmma3J8pmAn37Jz4" alt=""><figcaption></figcaption></figure>
7. In the buckets section, set the aggregate type to "Date Histogram".

   <figure><img src="/files/2Q3869IVNkGdDtOGbaFA" alt=""><figcaption></figcaption></figure>
8. Select the field to aggregate: "\_meta.creatAt".

   <div><figure><img src="https://github.com/QTN-DEV/quantumbyte-doc/blob/main/.gitbook/assets/Screen%20Shot%202024-06-24%20at%2013.01.26.jpg" alt=""><figcaption></figcaption></figure> <figure><img src="/files/e63TOECjooAlcgaPWpOe" alt=""><figcaption></figcaption></figure></div>
9. Set the interval to "day".

   <figure><img src="/files/YKVwqiDhi8e5IZoblN6h" alt=""><figcaption></figcaption></figure>
10. Click Save to apply your configuration.

    <figure><img src="/files/8T85vKpfmqyPEkjJxqaj" alt=""><figcaption></figcaption></figure>
11. Don't forget to Save the main developer page to keep all your changes.

    <figure><img src="/files/FQJtFzErqjYtMbIZ3cHd" alt=""><figcaption></figcaption></figure>

    <figure><img src="https://github.com/QTN-DEV/quantumbyte-doc/blob/main/.gitbook/assets/Screen%20Shot%202024-06-24%20at%2013.03.35.jpg" alt=""><figcaption></figcaption></figure>

***

#### Config Chart - Bar

Follow these steps to configure the bar chart:

1. Click the gear icon on the bar chart widget.

   <figure><img src="/files/9TWQODgbJOVLFKgTss73" alt=""><figcaption></figcaption></figure>

   <figure><img src="https://github.com/QTN-DEV/quantumbyte-doc/blob/main/.gitbook/assets/Screen%20Shot%202024-06-24%20at%2013.09.30.jpg" alt=""><figcaption></figcaption></figure>
2. The configuration panel will open.

   <figure><img src="/files/3lSonSRVWRHENUZPsWXF" alt=""><figcaption></figcaption></figure>

   <figure><img src="https://github.com/QTN-DEV/quantumbyte-doc/blob/main/.gitbook/assets/Screen%20Shot%202024-06-24%20at%2013.12.18.jpg" alt=""><figcaption></figcaption></figure>
3. For the data source, select "**dev**".

   <figure><img src="/files/qPPgd09WOWSaMGvpmv4R" alt=""><figcaption></figcaption></figure>
4. For the data, choose the form you created: "Form Pengaduan".

   <figure><img src="/files/VIIGjfBXBj66aNJY9oJX" alt=""><figcaption></figcaption></figure>
5. Set the metric to "count".

   <figure><img src="/files/vPm83bRB2zGaeaYUbf2y" alt=""><figcaption></figcaption></figure>
6. For the label, enter "Jenis Pengaduan" (Complaint Type).

   <figure><img src="/files/R1CQbgJML5jSx2nlJqAW" alt=""><figcaption></figcaption></figure>
7. In the buckets section, set the aggregate type to "Terms".

   <figure><img src="/files/aZKcZBxEqlP0rUoowT2I" alt=""><figcaption></figcaption></figure>
8. Select the field to aggregate: "jenis\_pengaduan".

   <figure><img src="/files/6kD8pkYusLwTFCdN8pam" alt=""><figcaption></figcaption></figure>
9. For the order, select "Metric".

   <figure><img src="/files/HSHE4ZxxCJ8YBeMutGL7" alt=""><figcaption></figcaption></figure>
10. For the type, select "**Desc**" (Descending).

    <div><figure><img src="https://github.com/QTN-DEV/quantumbyte-doc/blob/main/.gitbook/assets/Screen%20Shot%202024-06-24%20at%2013.28.17.jpg" alt=""><figcaption></figcaption></figure> <figure><img src="/files/IINRzdaEk6o1p5xxzAxM" alt=""><figcaption></figcaption></figure></div>
11. For the size, set the value to 20.

    <figure><img src="/files/wyHljeOETXF1TEu1wKpF" alt=""><figcaption></figcaption></figure>
12. Click **Save** to apply your configuration.

    <figure><img src="/files/20e8Ymin43oMYs4VYhFL" alt=""><figcaption></figcaption></figure>
13. Finally, remember to **Save** the main developer page to keep all your changes.

    <figure><img src="/files/nLluNoRuI9ZBScF2iIRh" alt=""><figcaption></figcaption></figure>

    <figure><img src="https://github.com/QTN-DEV/quantumbyte-doc/blob/main/.gitbook/assets/Screen%20Shot%202024-06-24%20at%2013.29.50.jpg" alt=""><figcaption></figcaption></figure>

***

### Data Management Dashboard

You can manage the data submitted by users through the frontend form. The available actions include:

1. Viewing data details
2. Deleting data
3. Updating or editing data

***

#### Add Page

To create a data management dashboard, we first need to add a new page. We'll do this because the previous page is dedicated to our monitoring dashboard, which contains all the charts we've already set up.

Follow these steps to add a new page to the backoffice/backend:

1. Click the **plus icon (+)** to add a new page.

   <figure><img src="/files/Z4wpgxlCs9m7p3GG3nnC" alt=""><figcaption></figcaption></figure>

   <figure><img src="https://github.com/QTN-DEV/quantumbyte-doc/blob/main/.gitbook/assets/Screen%20Shot%202024-06-24%20at%2014.51.38.jpg" alt=""><figcaption></figcaption></figure>
2. A configuration panel will appear.

   <figure><img src="/files/TVTApgyc3b4GyP9tBI1n" alt=""><figcaption></figcaption></figure>

   <figure><img src="https://github.com/QTN-DEV/quantumbyte-doc/blob/main/.gitbook/assets/Screen%20Shot%202024-06-24%20at%2014.54.48.jpg" alt=""><figcaption></figcaption></figure>
3. In the "**Name**" field, enter a name for this page. For this example, let's use "**Data Pengaduan**" (Complaint Data).

   <figure><img src="/files/lvngG6tmkGv2LjQAP5hZ" alt=""><figcaption></figcaption></figure>
4. Click "**Blank Page**" as the template.

   <figure><img src="/files/itacQMAhn8EsQKmS8bOn" alt=""><figcaption></figcaption></figure>
5. At this point, page has already been added.
6. Click "**Save**" to store the changes.

   <figure><img src="/files/yK4YP3b9yUIYIYP9sbZT" alt=""><figcaption></figcaption></figure>

   <figure><img src="https://github.com/QTN-DEV/quantumbyte-doc/blob/main/.gitbook/assets/Screen%20Shot%202024-06-24%20at%2014.57.28.jpg" alt=""><figcaption></figcaption></figure>

***

#### Data Form Configuration

We've already added a page for our data management dashboard. Now, let's add a data widget to this page. This widget will display the submissions from our frontend form, "Form Pengaduan".

Follow these steps to add and configure the "Form Pengaduan" data widget:

1. Go to the "Data Pengaduan" (Complaint Data) page.

   <figure><img src="/files/ko0lC2jw7syfx96gSPrI" alt=""><figcaption></figcaption></figure>

   <figure><img src="https://github.com/QTN-DEV/quantumbyte-doc/blob/main/.gitbook/assets/Screen%20Shot%202024-06-24%20at%2014.58.27.jpg" alt=""><figcaption></figcaption></figure>
2. Click "**Tambah Widget**" (Add Widget).

   <figure><img src="/files/4ZEM4DhIEZ34PMW07K7l" alt=""><figcaption></figcaption></figure>

   <figure><img src="https://github.com/QTN-DEV/quantumbyte-doc/blob/main/.gitbook/assets/Screen%20Shot%202024-06-24%20at%2014.59.07.jpg" alt=""><figcaption></figcaption></figure>
3. Under the data sub-menu, click "**Data Form Pengaduan"**.

   <figure><img src="/files/DFhriAvP9vPyEAb9ycXQ" alt=""><figcaption></figcaption></figure>

   <figure><img src="https://github.com/QTN-DEV/quantumbyte-doc/blob/main/.gitbook/assets/Screen%20Shot%202024-06-24%20at%2015.35.27%20(1).jpg" alt=""><figcaption></figcaption></figure>
4. Click the **gear icon** to set up the widget.

   <figure><img src="/files/1NYrf6Rif5q3CS9T3wI3" alt=""><figcaption></figcaption></figure>

   <figure><img src="https://github.com/QTN-DEV/quantumbyte-doc/blob/main/.gitbook/assets/Screen%20Shot%202024-06-24%20at%2015.37.27.jpg" alt=""><figcaption></figcaption></figure>
5. The configuration panel will open.

   <figure><img src="/files/xQZSHuOJWNVDLarK2EVp" alt=""><figcaption></figcaption></figure>

   <figure><img src="https://github.com/QTN-DEV/quantumbyte-doc/blob/main/.gitbook/assets/Screen%20Shot%202024-06-24%20at%2015.38.13.jpg" alt=""><figcaption></figcaption></figure>
6. In the **Title** field, enter "**Data**".

   <figure><img src="/files/Ll1ncl3g1CVqVFUytTVq" alt=""><figcaption></figcaption></figure>
7. For the **Grid Title**, select the field to be the main title. In this case, use "**\_user.nama\_lengkap**" (User's Full Name).

   <figure><img src="/files/pidEwePdFKhTMMFqK7ZZ" alt=""><figcaption></figcaption></figure>
8. For the **Grid Image**, select the field for the image. In this case, use "**foto**" (photo).

   <figure><img src="/files/tHzaAUiXVzC4iqhkRY2P" alt=""><figcaption></figcaption></figure>

   <figure><img src="https://github.com/QTN-DEV/quantumbyte-doc/blob/main/.gitbook/assets/Screen%20Shot%202024-06-24%20at%2015.40.32%20(1).jpg" alt=""><figcaption></figcaption></figure>
9. You can add a description to the grid by clicking "**Add Grid Description**".

   <figure><img src="/files/6jLIRrLZn1BQwWE3RJwk" alt=""><figcaption></figcaption></figure>

   <figure><img src="https://github.com/QTN-DEV/quantumbyte-doc/blob/main/.gitbook/assets/Screen%20Shot%202024-06-24%20at%2015.41.15.jpg" alt=""><figcaption></figcaption></figure>
10. A new configuration field for the description will appear.

    <figure><img src="/files/5WrRzC7SPEmM9kcvngyS" alt=""><figcaption></figcaption></figure>

    <figure><img src="https://github.com/QTN-DEV/quantumbyte-doc/blob/main/.gitbook/assets/Screen%20Shot%202024-06-24%20at%2015.51.55.jpg" alt=""><figcaption></figcaption></figure>
11. In the **Field** column, select the data field to display. Here, choose "**jenis\_pengaduan**" (Complaint Type).

    <figure><img src="/files/RQLntp3eHbYzolsrp0I5" alt=""><figcaption></figcaption></figure>
12. In the **Label** column, enter the display text: "**Jenis Pengaduan**".

    <figure><img src="/files/362IS1c7EenyLzBQH1Jm" alt=""><figcaption></figcaption></figure>
13. Click "**Add Grid Description**" again to add another line.

    <figure><img src="/files/mpXR8QB3k9NfPWJ7f51w" alt=""><figcaption></figcaption></figure>

    <figure><img src="https://github.com/QTN-DEV/quantumbyte-doc/blob/main/.gitbook/assets/Screen%20Shot%202024-06-24%20at%2015.56.15.jpg" alt=""><figcaption></figcaption></figure>
14. For this new field, select "**status**".

    <figure><img src="/files/K52PdH9YWtfWf0OhiMau" alt=""><figcaption></figcaption></figure>
15. For its label, enter the text: "**Status**".
16. In the **Background Color** field, you can map status values to colors using a colon (:). For example:

    * `waspada:#FFFF00` (Yellow)
    * `siaga:#FFA500` (Orange)
    * `awas:#FF0000` (Red)

    <figure><img src="/files/wE5OTzh5W1SVJWcITGUI" alt=""><figcaption></figcaption></figure>
17. Click "**Simpan**" (Save) to apply this configuration.

    <figure><img src="/files/i9yZiFFrH3NPmgcD00AX" alt=""><figcaption></figcaption></figure>
18. Finally, remember to **Save** the main developer page to keep all your changes.

    <figure><img src="/files/3N3DzDe7FiJCDdH9BeMM" alt=""><figcaption></figcaption></figure>

    <figure><img src="https://github.com/QTN-DEV/quantumbyte-doc/blob/main/.gitbook/assets/Screen%20Shot%202024-06-24%20at%2016.11.00.jpg" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
Up to this the backend configuration is completed.
{% endhint %}

***

### API Integration

The developer section has an **API Integration** page for connecting to your existing backend or systems. You can adapt it to your needs using the provided endpoints:

1. `POST /update/{id}`
2. `POST /delete/{id}`
3. `GET /detail/{id}`
4. `GET /list`
5. `GET /aggs`

   <figure><img src="https://github.com/QTN-DEV/quantumbyte-doc/blob/main/.gitbook/assets/Screen%20Shot%202024-06-24%20at%2016.18.28.jpg" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/VKOb5ra3TJvYNshl8qEb" alt=""><figcaption></figcaption></figure>

***

### Use Postman Collection

You can test these endpoints directly using POSTMAN by downloading the collection file from the API Integration page.

{% hint style="warning" %}
Before testing, please submit some data using your service's mobile app form. This ensures the API has data to return when you send a request.
{% endhint %}

Berikut langkah-langkah mengunduh postman collection

1. Go to the **Integrasi API** (API Integration) sub-menu in your service's developer page.

   <figure><img src="/files/ZK1az04FwObEVWZ2K4SX" alt=""><figcaption></figcaption></figure>

   <figure><img src="https://github.com/QTN-DEV/quantumbyte-doc/blob/main/.gitbook/assets/Screen%20Shot%202024-06-24%20at%2016.21.51.jpg" alt=""><figcaption></figcaption></figure>
2. Click on **Form Pengaduan**.

   <figure><img src="/files/YZgx9lTDVyLiKSei3tcl" alt=""><figcaption></figcaption></figure>

   <figure><img src="https://github.com/QTN-DEV/quantumbyte-doc/blob/main/.gitbook/assets/Screen%20Shot%202024-06-24%20at%2016.25.04.jpg" alt=""><figcaption></figcaption></figure>
3. Click **Postman Collection (Development)** to download the file.
4. Open the **Postman** application on your computer.
5. Click **Import** to bring the collection into Postman.

   <figure><img src="/files/GONKKVgEPMgprybTmTEV" alt=""><figcaption></figcaption></figure>

   <figure><img src="https://github.com/QTN-DEV/quantumbyte-doc/blob/main/.gitbook/assets/Screen%20Shot%202024-06-24%20at%2016.30.31.jpg" alt=""><figcaption></figcaption></figure>
6. Upload the downloaded JSON file in the import window.

   <figure><img src="/files/kpgTcu39GSnDFzelJdSb" alt=""><figcaption></figcaption></figure>

   <figure><img src="https://github.com/QTN-DEV/quantumbyte-doc/blob/main/.gitbook/assets/Screen%20Shot%202024-06-24%20at%2016.33.05.jpg" alt=""><figcaption></figcaption></figure>
7. You have successfully downloaded and imported the collection into Postman.

   <figure><img src="/files/4AfxLXJz8hBiDR1nkAzv" alt=""><figcaption></figcaption></figure>

   <figure><img src="https://github.com/QTN-DEV/quantumbyte-doc/blob/main/.gitbook/assets/Screen%20Shot%202024-06-24%20at%2016.37.30.jpg" alt=""><figcaption></figcaption></figure>

***

#### Use GET /list

1. Inside Postman, open the **Form Pengaduan** collection.
2. Select the **GET /list** request.
3. Click the **Send** button.
4. If successful, the data will appear in the **Body** section below.

***

#### Use GET /detail{id}

1. Inside the **Form Pengaduan** collection in Postman.
2. Select the **GET /detail/{id}** request.
3. First, make sure you have copied a submission ID from the response of the **GET /list** request.
4. Paste the copied ID after `detail/` in the request URL. For example: `.../detail/AY2ryZ2sCrQ07KigLs3B`
5. Click the **Send** button.
6. If successful, the detailed data for that ID will appear in the **Body** section.

***

#### Use POST update/step-2{id}

1. Go to the "Form Pengaduan" collection in Postman.
2. Select the **POST update/step-1{id}** request.
3. Make sure you have copied a submission ID from the **GET /list** endpoint.
4. Paste the copied ID after `update/step-2/` in the URL.
5. Click on the **Body** tab.
6. In the `status` value field, change the value to **"DIPROSES"** (IN PROGRESS).
7. Click **Send**.
8. If successful, you will get a response body like the following image. To see the result, go to the backoffice of your service.
9. Click **Pratinjau** (Preview) to enter preview mode.
10. Go to the **"Data Pengaduan"** (Complaint Data) page.
11. Check the status of the complaint data. The status has now changed from **"MENUNGGU DIPROSES"** (AWAITING PROCESSING) to **"DIPROSES"** (IN PROGRESS).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.quantumbyte.ai/home/quantumbyte-v2.0/2.builder/1.frontend/1.started/1.simple_layanan.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
