Append values to a field
Last updated
Last updated
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..
This is used to copy a non-array field to a non-array field or copy from an array type of field to an array type of field
This is used to append non-array field values to an array type of field.
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 Copy field values condition on Field B. This means, the value entered in Field A is copied to Field B.
Now what happens?
The user enters a value India in Field A and Field B automatically shows its value as India.
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.
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?
The user enters a value India in Field A and Field B automatically shows its value as India.
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 previous value India makes the 1st row and the new value USA makes the 2nd row of Field B.
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.
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.
While creating submission, we enter 1st student name Naveen 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 on.
Hence, we managed to create a list of all students in a single submission.
Yes. There are two restrictions as of now.
The user can append only textfield/select/multiselect/radio/email/phone fields. So, going by our Field A/Field B example. Field A can be any of the fields mentioned in this point.
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 (Field B in address) can be:
Create an array type textfield and apply Append condition on it.
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.
To summarise,
We can create input fields as textfield/select/multi-select/radio/email/phone field. Input fields are those whose values we want to append.
We can create output fields as textfields only ( outside the section or inside the section).
Input field is a non-array type of field and output field should always be the array type field.