> For the complete documentation index, see [llms.txt](https://help.bioinsight.illumina.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.bioinsight.illumina.com/connected-analytics/project-web-ui/p-flow/pipelines-new-view/json-based-input-forms.md).

# JSON-Based input forms

### Introduction

Pipelines defined using the "Code" mode require an XML or JSON-based input form to define the fields shown on the launch view in the user interface (UI).

To create a JSON-based Nextflow (or CWL) pipeline, go to **Projects > your\_project > Flow > Pipelines > +Create > Nextflow (or CWL) > JSON-based**.

### Fields

A JSON input form consists of a list of **fields** which will be displayed as a vertical list.

* Each field requires a **type** attribute which determines what type of field it is such as a textbox, radio button, number,....
* Each field has a mandatory unique **id** which serves as the key for passing the value to the underlying nextflow or cwl script and identifies the field.
* Fields can have a number of optional attributes which are [listed here](/connected-analytics/project-web-ui/p-flow/pipelines-new-view/json-based-input-forms/inputform-json.md#pipelineinputforms-parameterattributes) to hide them or limit their possible input values.

### Files

The files listed here, located on the inputform files tab, work together for evaluating and presenting JSON-based input.

* [**inputForm.json**](/connected-analytics/project-web-ui/p-flow/pipelines-new-view/json-based-input-forms/inputform-json.md) contains the actual input form which is rendered when starting the pipeline run.
* [**onRender.js**](/connected-analytics/project-web-ui/p-flow/pipelines-new-view/json-based-input-forms/onrender.js.md) is triggered when a value is changed.
* [**onSubmit.js**](/connected-analytics/project-web-ui/p-flow/pipelines-new-view/json-based-input-forms/onsubmit.js.md) is triggered when starting a pipeline via the GUI or API.
* [**onFinish.js**](/connected-analytics/project-web-ui/p-flow/pipelines-new-view/json-based-input-forms/onfinished.js.md) (optional, not automatically created) is triggered once the pipeline analysis has been completed

### Actions when editing

Use **+ Create** to add additional files and **Simulate** to test your inputForms.

Scripting execution supports crossfield validation of the values, hiding fields, making them required, .... based on value changes.


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://help.bioinsight.illumina.com/connected-analytics/project-web-ui/p-flow/pipelines-new-view/json-based-input-forms.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
