> For the complete documentation index, see [llms.txt](https://developers.didomi.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developers.didomi.io/api-and-platform/widgets/privacy-widgets/edit-a-widget/content-and-design/components/dsar_form.md).

# dsar\_form

`LayoutComponent` ❌ Theme ✅ Options ❌ Content & Translations

First, take a look at the mapping between `options` properties and widget elements in these three visuals below.

<div align="center"><figure><img src="/files/1VlHE6SpFMIINCzb3Rh4" alt=""><figcaption></figcaption></figure></div>

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

<div align="center"><figure><img src="/files/QoKGcrghmO95UCbnc2cg" alt=""><figcaption></figcaption></figure></div>

To edit Privacy request widget design, you need to edit the layout-component `dsar_form` by sending a **PATCH** request on `/widgets/layout-components/{layout-component-id}` and specifying options in `options` property.

{% hint style="warning" %}
Be careful when you are editing the `options` property. This is a JSONB and by design, you need to fill in every properties already added every time you edit this object.
{% endhint %}

```json
PATCH https://api.didomi.io/widgets/layout-components/{layout_component_id}?organization_id=YOUR_ORG_ID&widget_id=YOUR_WIDGET_ID

{
    "type": "dsar_form",
    "organization_id": "YOUR_ORGANIZATION_ID",
    "options": {
        ...
    }
}
```

#### General options

| Element                     | Description                                                    | Component options                                                                                                                |
| --------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- |
| `card`                      | Container of Privacy request widget                            | [DidomiCardOptions](/api-and-platform/widgets/privacy-widgets/edit-a-widget/content-and-design/options.md#didomicardoptions)     |
| `formTitle`                 | Title of widget                                                | [DidomiTextOptions](/api-and-platform/widgets/privacy-widgets/edit-a-widget/content-and-design/options.md#didomitextoptions)     |
| `firstStepButton`           | Button to validate first step of form                          | [DidomiButtonOptions](/api-and-platform/widgets/privacy-widgets/edit-a-widget/content-and-design/options.md#didomibuttonoptions) |
| `backButton`                | Button to go back to first step                                | [DidomiButtonOptions](/api-and-platform/widgets/privacy-widgets/edit-a-widget/content-and-design/options.md#didomibuttonoptions) |
| `secondStepButton`          | Button to submit the form                                      | [DidomiButtonOptions](/api-and-platform/widgets/privacy-widgets/edit-a-widget/content-and-design/options.md#didomibuttonoptions) |
| `formHint`                  | Hint at the bottom of second step                              | [DidomiTextOptions](/api-and-platform/widgets/privacy-widgets/edit-a-widget/content-and-design/options.md#didomitextoptions)     |
| `sendRequestErrorMessage`   | Error message when the request was not created after submitted | [DidomiTextOptions](/api-and-platform/widgets/privacy-widgets/edit-a-widget/content-and-design/options.md#didomitextoptions)     |
| `successMessageTitle`       | Title in confirmation step                                     | [DidomiTextOptions](/api-and-platform/widgets/privacy-widgets/edit-a-widget/content-and-design/options.md#didomitextoptions)     |
| `successMessageDescription` | Description in confirmation step                               | [DidomiTextOptions](/api-and-platform/widgets/privacy-widgets/edit-a-widget/content-and-design/options.md#didomitextoptions)     |
| `closeIcon`                 | Close button to go back to first step from confirmation step   | [DidomiStyle](/api-and-platform/widgets/privacy-widgets/edit-a-widget/content-and-design/options.md#didomistyle)                 |
| `formButtonsWrapper`        | Wrapper of buttons in second step                              | [DidomiStyle](/api-and-platform/widgets/privacy-widgets/edit-a-widget/content-and-design/options.md#didomistyle)                 |
| `backButtonWrapper`         | Wrapper of back button in second step                          | [DidomiStyle](/api-and-platform/widgets/privacy-widgets/edit-a-widget/content-and-design/options.md#didomistyle)                 |
| `secondStepButtonWrapper`   | Wrapper of confirm button in second step                       | [DidomiStyle](/api-and-platform/widgets/privacy-widgets/edit-a-widget/content-and-design/options.md#didomistyle)                 |
| `loader`                    | Loader in confirm button in second step when clicked           | [DidomiStyle](/api-and-platform/widgets/privacy-widgets/edit-a-widget/content-and-design/options.md#didomistyle)                 |

#### userRightOptions

| Element        | Description                 | Component options                                                                                                |
| -------------- | --------------------------- | ---------------------------------------------------------------------------------------------------------------- |
| `title`        | Title in second step        | [DidomiStyle](/api-and-platform/widgets/privacy-widgets/edit-a-widget/content-and-design/options.md#didomistyle) |
| `description`  | Description in second step  | [DidomiStyle](/api-and-platform/widgets/privacy-widgets/edit-a-widget/content-and-design/options.md#didomistyle) |
| `radioOptions` | Radio buttons in first step | [radioOptions](#radiooptions)                                                                                    |

#### radioOptions

| Element                 | Description                                  | Component options                                                                                                                  |
| ----------------------- | -------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
| `label`                 | Label of a radio button                      | [DidomiStyle](/api-and-platform/widgets/privacy-widgets/edit-a-widget/content-and-design/options.md#didomistyle)                   |
| `backgroundColor`       | Background color of a radio button           | [ComponentOptionValue](/api-and-platform/widgets/privacy-widgets/edit-a-widget/content-and-design/options.md#componentoptionvalue) |
| `circleColor`           | Radio circle of a radio button               | [ComponentOptionValue](/api-and-platform/widgets/privacy-widgets/edit-a-widget/content-and-design/options.md#componentoptionvalue) |
| `borderRadius`          | Border radius of a radio button              | [ComponentOptionValue](/api-and-platform/widgets/privacy-widgets/edit-a-widget/content-and-design/options.md#componentoptionvalue) |
| `padding`               | Padding of a radio button                    | [ComponentOptionValue](/api-and-platform/widgets/privacy-widgets/edit-a-widget/content-and-design/options.md#componentoptionvalue) |
| `circleBackgroundColor` | Background of radio circle of a radio button | [ComponentOptionValue](/api-and-platform/widgets/privacy-widgets/edit-a-widget/content-and-design/options.md#componentoptionvalue) |
| `borderColor`           | Border of radio circle of a radio button     | [ComponentOptionValue](/api-and-platform/widgets/privacy-widgets/edit-a-widget/content-and-design/options.md#componentoptionvalue) |

#### formFieldsOptions

| Element             | Description | Component options                                                                                                                       |
| ------------------- | ----------- | --------------------------------------------------------------------------------------------------------------------------------------- |
| `formFieldsOptions` | Text input  | [DidomiFormFieldsOptions](/api-and-platform/widgets/privacy-widgets/edit-a-widget/content-and-design/options.md#didomiformfieldoptions) |

We have gathered all elements and their options in the following object. You can use it to edit the `dsar_form` options by sending a **PATCH** request on `/widgets/layout-components/{layout-component-id}`.

```json
PATCH https://api.didomi.io/widgets/layout-components/{layout_component_id}?organization_id=YOUR_ORG_ID&widget_id=YOUR_WIDGET_ID

{
    "type": "dsar_form",
    "options": {
        "formTitle": {
            "style": {
                "default": {}
            }
        },
        "firstStepButton": {
            "style": {
                "default": {}
            },
            "text": {
                "style": {
                    "default": {}
                },
                "content": {}
            }
        },
        "secondStepButton": {
            "style": {
                "default": {}
            },
            "text": {
                "style": {
                    "default": {}
                },
                "content": {}
            }
        },
        "backButton": {
            "style": {
                "default": {}
            },
            "text": {
                "style": {
                    "default": {}
                },
                "content": {}
            }
        },
        "formHint": {
            "style": {
                "default": {}
            },
            "content": {}
        },
        "sendRequestErrorMessage": {
            "style": {
                "default": {}
            },
            "content": {}
        },      
        "successMessageTitle": {
            "style": {
                "default": {}
            },
            "content": {}
        },
        "successMessageDescription": {
            "style": {
                "default": {}
            },
            "content": {}
        },
        "closeIcon": {
            "style": {
                "default": {}
            }
        },
        "formButtonsWrapper": {
            "style": {
                "default": {}
            }
        },
        "backButtonWrapper": {
            "style": {
                "default": {}
            }
        },
        "secondStepButtonWrapper": {
            "style": {
                "default": {}
            }
        },
        "loader": {
            "style": {
                "default": {}
            }
        },
        "userRightsOptions": {
            "title": {
                "style": {
                    "default": {}
                }
            },
            "description": {
                "style": {
                    "default": {}                
                } 
            },
            "radioOptions": {
                "label": {
                    "style": {
                        "default": {}                      
                    }
                },
                "backgroundColor": "",
                "circleColor": "",
                "borderRadius": "",
                "padding": "",
                "circleBackgroundColor": "",
                "borderColor": ""
            }
        },
        "formFieldsOptions": {
            "label": {
                "style": {
                    "default": {}                
                }
            },
            "description": {
                 "style": {
                    "default": {}                
                }              
            },
            "hint": {
                   "style": {
                    "default": {}                
                }                
            },
            "errorMessage": {
                 "style": {
                    "default": {}                
                }                
            },
            "inputOptions": {
                "fontColor": "",
                "fontSize": "",
                "fontWeight": "",
                "lineHeight": "",
                "borderRadius": "",
                "borderColor": "",
                "borderWidth": "",
                "errorBorderColor": "",
                "placeholderColor": "",
                "backgroundColor": ""
            }
        }
    },
    "organization_id": "YOUR_ORGANIZATION_ID"
}
```


---

# 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://developers.didomi.io/api-and-platform/widgets/privacy-widgets/edit-a-widget/content-and-design/components/dsar_form.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.
