# Set Input Feedback in Data Design

{% hint style="info" %}
**Block Information**

Available in: Page Flow

Toolbox Category: Input

Block Type: [Regular](https://docs.zingy.ai/app-editor/block-anatomy#regular-block)
{% endhint %}

**`Set Input Feedback in Data Design`** is a [regular block](https://docs.zingy.ai/app-editor/block-anatomy#regular-block) that allows you to set the feedback for [Input](https://docs.zingy.ai/app-editor/page-editor/built-in-elements/input), [Dropdown](https://docs.zingy.ai/app-editor/page-editor/built-in-elements/dropdown), [Multi-line](https://docs.zingy.ai/app-editor/page-editor/built-in-elements/multi-line), [Checkbox](https://docs.zingy.ai/app-editor/page-editor/built-in-elements/checkbox) and [Toggle Switch](https://docs.zingy.ai/app-editor/page-editor/built-in-elements/toggle-switch) elements that were generated using the [Content from Data Design](https://docs.zingy.ai/app-editor/page-flow/toolbox-blocks/content-from-data-design) block and dynamically added to the page or form.

<div align="left"><figure><img src="https://3401585094-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmnBepgycwgisXr9ya1N4%2Fuploads%2FclkBjdhF0V0ukhZMee7U%2Fimage.png?alt=media&#x26;token=69f5cc2f-3f4c-4087-bbec-dd9b99f61fc2" alt="" width="267"><figcaption><p>Set Input Feedback in Data Design example</p></figcaption></figure></div>

{% hint style="warning" %}
NOTE: [Input](https://docs.zingy.ai/app-editor/page-editor/built-in-elements/input), [Dropdown](https://docs.zingy.ai/app-editor/page-editor/built-in-elements/dropdown), [Multi-line](https://docs.zingy.ai/app-editor/page-editor/built-in-elements/multi-line) elements must have their [**`Form Control`**](https://docs.zingy.ai/page-editor/built-in-elements/input#form-control) option set to "yes" for feedback control to work.
{% endhint %}

The feedback can be one of:

* Valid: Renders the element with a green border and a green check mark to indicate that the data entered is valid.
* Invalid: Renders the element with a red border and a red exclamation mark to indicate that the data entered is invalid.
* Cleared: Resets the element to it's original pre-validated state.

The behavior of the block is similar to the [Set Input Feedback](https://docs.zingy.ai/app-editor/page-flow/toolbox-blocks/set-input-feedback) block, with some important differences:

* Works only with elements generated using [Content from Data Design](https://docs.zingy.ai/app-editor/page-flow/toolbox-blocks/content-from-data-design) block that are dynamically added.
* Element Selection: You can only choose an element placed inside the selected [Data Design](https://docs.zingy.ai/app-editor/page-editor/built-in-elements/data-design) element.

The block consists of the following (from top to bottom):

* *Data Design*: [Selectable Input](https://docs.zingy.ai/app-editor/block-anatomy#selectable-input) to choose the [Data Design](https://docs.zingy.ai/app-editor/page-editor/built-in-elements/data-design) element whose element you want to target.
* *Element*: [Selectable Input](https://docs.zingy.ai/app-editor/block-anatomy#selectable-input) to choose the element, within the selected [Data Design](https://docs.zingy.ai/app-editor/page-editor/built-in-elements/data-design), you want to set the feedback of.
* *ID*: Optional [Value Parameter](https://docs.zingy.ai/app-editor/block-anatomy#value-parameters) that accepts a [*text*](https://docs.zingy.ai/app-editor/page-flow/references/value-types) value representing the unique value that was provided to the [Content from Data Design](https://docs.zingy.ai/app-editor/page-flow/toolbox-blocks/content-from-data-design) block. See below for more details.
* *ID2*: Optional [Value Parameter](https://docs.zingy.ai/app-editor/block-anatomy#value-parameters) that accepts a [*text*](https://docs.zingy.ai/app-editor/page-flow/references/value-types) value representing the secondary identifier that can be used to identify the desired element. See below for more details.
* *Data*: [Dropdown](https://docs.zingy.ai/app-editor/block-anatomy#dropdown) that accepts the type of feedback to set.

***

## ID and ID2 usage

The behavior of this block depends on the ID and ID2 [value parameters](https://docs.zingy.ai/app-editor/block-anatomy#value-parameters) and is detailed below:

* ID and ID2 not provided: Operate on the selected element for all generated instances of the same [Data Design](https://docs.zingy.ai/app-editor/page-editor/built-in-elements/data-design) element.
* ID2 provided and ID not provided: Operate on the selected element for all generated instances of the same [Data Design](https://docs.zingy.ai/app-editor/page-editor/built-in-elements/data-design) element with the same ID2 value.
* ID provided and ID2 not provided: Operate on the selected element for all generated instances of the same [Data Design](https://docs.zingy.ai/app-editor/page-editor/built-in-elements/data-design) element with the same ID value. Since we recommend the ID value to be unique, this would choose one from all the generated instances of the associated [Data Design](https://docs.zingy.ai/app-editor/page-editor/built-in-elements/data-design) element.
* ID and ID2 provided: Operate on the selected element for all generated instances of the same [Data Design](https://docs.zingy.ai/app-editor/page-editor/built-in-elements/data-design) element with the same ID  and ID2 value.&#x20;

***

## Usage Examples

{% hint style="info" %}
**NOTE: Please refer to the prerequisite information shown** [**here**](https://docs.zingy.ai/app-editor/page-flow/references/prerequisite-for-dynamic-content-block-examples) **before seeing the example.**&#x20;
{% endhint %}

The image below shows an example in which the feedback for the [Input](https://docs.zingy.ai/app-editor/page-editor/built-in-elements/input) element (*Input43*) is set to "Invalid" for Company 2, which is rendered with the ID *ST101*.

<div align="left"><figure><img src="https://3401585094-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmnBepgycwgisXr9ya1N4%2Fuploads%2FJDVaxOXHcN1HnVOu3NLx%2Fimage.png?alt=media&#x26;token=d6c7a856-6234-44a4-a287-6f0ea42b6066" alt="" width="516"><figcaption><p>Set Input Feedback in Data Design example 1</p></figcaption></figure></div>

The result of the above example is highlighted below, where the [Input](https://docs.zingy.ai/app-editor/page-editor/built-in-elements/input) element (*Input43*) is shown with a red border and red exclamation mark for Company 2.

<figure><img src="https://3401585094-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmnBepgycwgisXr9ya1N4%2Fuploads%2FjGPUC0c8izMqAVMVHTq0%2Fimage.png?alt=media&#x26;token=f0cc9a4a-ac8e-4b42-8dbc-90f0843faa84" alt=""><figcaption><p>Result of example 1</p></figcaption></figure>

In the second example, we will demonstrate the scenario where neither ID nor ID2 are provided. In this case, the system will set the feedback for the [Input](https://docs.zingy.ai/app-editor/page-editor/built-in-elements/input) element (*Input43*) to *Valid* for all generated instances.

<div align="left"><figure><img src="https://3401585094-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmnBepgycwgisXr9ya1N4%2Fuploads%2Fu7xi4jlqVlgjtqT0zAzQ%2Fimage.png?alt=media&#x26;token=b07248ed-6d22-4851-a697-79a86c1853cc" alt="" width="455"><figcaption><p>Set Input Feedback in Data Design example 2</p></figcaption></figure></div>

The result of the above example is highlighted below, where the [Input](https://docs.zingy.ai/app-editor/page-editor/built-in-elements/input) element (*Input43*) is shown with a green border and green check mark for both the companies.

<figure><img src="https://3401585094-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmnBepgycwgisXr9ya1N4%2Fuploads%2FhTuDpVuADDoTtl8GjHui%2Fimage.png?alt=media&#x26;token=95adb4bd-e672-4aca-8dd7-f539daf342ab" alt=""><figcaption><p>Result of example 2</p></figcaption></figure>
