# Append values to a field

This feature allows the user to append a non array field's value to an array type of field. The user keeps on editing the non array field and with every new entry a new row is created in the array field.

Confused? Let's dig a bit..

### What is the difference between [<mark style="color:purple;">Copy field values</mark>](/form-builder/creating-forms/additional-form-settings/conditions/copy-field-values.md) and Append values?

| Copy field values                                                                                                                       | Append field values                                                                 |
| --------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- |
| <p>This is used to copy a non-array field to a non-array field <br>or<br>copy from an array type of field to an array type of field</p> | <p>This is used to append non-array field values to an array type of field.<br></p> |

### Need more explanation?

Let's understand with an example of two fields, **Field A** and **Field B.**

User objective: To copy field values from Field A to Field B.

For understanding purpose lets assume that Field A is non array and Field B is an array type field in both the cases.

**Case 1:** We use [<mark style="color:purple;">Copy field values</mark>](/form-builder/creating-forms/additional-form-settings/conditions/copy-field-values.md) condition on Field B. This means, the value entered in Field A is copied to Field B.

Now what happens?

1. The user enters a value **India** in Field A and Field B automatically shows its value as **India.**

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

2\. The user enters a value **USA** in Field A and Field B automatically shows its value as USA. The moment user changes the value **India** to **USA** without creating a successful submission, the value **India** is lost and the new value **USA** is the only visible value.

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

What if I need to retain India/USA and all other values entered in real time before creating a successful submission.

There comes the **Append values** condition. Let's see Case 2.

**Case 2**: We use **Append field values** condition on Field B. This means, the value entered in Field A gets appended to Field B.

Now what happens?

1. The user enters a value **India** in Field A and Field B automatically shows its value as **India.**

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

2\. The user enters a value **USA** in Field A and Field B automatically shows its value as USA. The moment user changes the value **India** to **USA** without creating a successful submissio&#x6E;**,** the previous value **India** makes the 1st row and the new value **USA** makes the 2nd row of **Field B.**

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

So, the user can keep on giving new values to **Field A** and these values will be appended to **Field B** in the same order the user entered values in **Field A.** Once the intended list is created, the user can create a submission via clicking on **Submit** button.

### What is the use case?

Let's suppose we need to create a list of names of all the students in the class. So, we create a form with a non array textfield titled **Name** to record Name of the students and an array type of textfield titled **List** with **Append values** condition set on it.&#x20;

While creating submission, we enter 1st student name N**aveen** in the field **Name** and this value **Naveen** automatically populates in 1st row of the field **List.** We delete **Naveen** from the field **Name** and enter 2nd name **Shradha** in the same submission and this value **Shradha** populates automatically in the 2nd row of the field **List**. We erase off **Shradha** and enter the third value for the field **Name** as **Deepak** and the value **Deepak** automatically populates the 3rd row of the field **List** and so o&#x6E;**.**

Hence, we managed to create a list of all students in a single submission.

### Is there any restriction?

Yes. There are two restrictions as of now.

1. The user can append only textfield/select/multiselect/radio/email/phone fields. So, going by our [<mark style="color:purple;">**Field A/Field B**</mark>](#need-more-explanation) example. **Field A** can be any of the fields mentioned in this point.
2. The can append to only textfield type of field. So, in our example, **Field B** can be only textfield type.

The two possible scenarios for creating Append condition on a field ([<mark style="color:purple;">Field B</mark> ](#need-more-explanation)in address) can be:

1. Create an array type textfield and apply Append condition on it.&#x20;

Field A: can be any one of these - textfield/select/multiselect/radio/email/phone

Field B: textfield array type field.

2\. Create a section array with multiple textfields as its columns.

Field B: section array with textfield type columns. Let's assume we created 4 columns.

Field A: there is no one field here now. We create 4 different fields which can be any of the types mentioned (textfield/select/multiselect/radio/email/phone) and append them to section array columns.

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

### Conclusion     &#x20;

To summarise,

1. We can create input fields as textfield/select/multi-select/radio/email/phone field. Input fields are  those whose values we want to append.
2. We can create output fields as textfields only ( outside the section or inside the section).
3. Input field is a non-array type of field and output field should always be the **array** type field.


---

# Agent Instructions: 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:

```
GET https://docs.senpiper.com/form-builder/creating-forms/additional-form-settings/conditions/append-values-to-a-field.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
