Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions docs/developer/develop-a-capture-plugin.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ Developing a capture plugin is almost the same as developing a regular DHIS2 cus

## Step 1: Create a new DHIS2 custom app

To create a new DHIS2 custom app, you can use the D2 CLI.
To create a new DHIS2 custom app, you can use the `npm create @dhis2/app` command.

The D2 CLI helps you with many things, such as setting up a new project, building your app, and deploying it to your DHIS2 instance.
This will prompt you with a series of questions to help you set up your new app, and once completed, it will create all the necessary files and packages for you.

Please read our documentation on the [D2 CLI](/docs/quickstart/quickstart-web) to learn more about how to use it.
Please read our documentation for details on how to use the command [here](/docs/cli/create-app).

```sh
d2 app scripts init my-form-field-plugin
npm create @dhis2/app
```

## Step 2: Add a plugin entrypoint
Expand Down
5 changes: 3 additions & 2 deletions docs/developer/form-field-plugins/developer-details.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,13 +130,14 @@ type SetContextFieldValueProps = {
}

export type IFormFieldPluginProps = {
orgUnitId: string;
values: Record<string, any>;
errors: Record<string, string[]>;
warnings: Record<string, string[]>;
fieldsMetadata: Record<string, fieldsMetadata>;
setFieldValue: (values: SetFieldValueProps) => void;
setContextFieldValue: (values: SetContextFieldValueProps) => void;
viewMode: boolean;
formSubmitted: boolean;
setFieldValue: (values: SetFieldValueProps) => void;
setContextFieldValue: (values: SetContextFieldValueProps) => void;
}
```
Loading