Cognito-forms – I want a field to copy (duplicate) the data from another field

cognito-forms

I am building a Booking Form for my tours. So for the Lead Passenger I created a field named TRIP CODE. I want that code to be duplicated in the additional passenger field without having to type it again.

So I created the same field in the additional passenger section and wrote the formula =TripCode in this new text field. But it is not working.

I just realized that when working in this ADDITIONAL PASSERGERS section (which is a repeating section) fields formulas work with the fields created only in this section but not in the ones created outside this section.

Best Answer

You can enter calculations for the Default Value of a field in Cognito Forms to be the value of another field. This will copy the data from the other field when it changes, but still allow the user to make changes.

For example, if your first field is named Field 1, then the Default Value of Field 2 should be =Field1.