Copying data from one text field to another on a click event

osubsu shared this question 7 years ago
Answered

I want to prototype a page where the user fills in their name and address for billing purposes. On the same page they can provide the same information for shipping. I've provided a checkbox saying the shipping address is the same as the billing address. If the user checks that box I want the values in the billing fields automatically copied into the equivalent shipping fields.


I've tried two approaches. In the first approach I created a click event that for the last name it copied "input_1" (the last name in the billing column) to "input_6" (the last name in the shipping column). In the second approach I associated a variable with each input field and set the value of the second last name variable to that of the first variable. In both cases nothing happens. I click on the checkbox and none of the values from the billing column copy to the shipping column.


What am I doing wrong?

Comments (1)

photo
1

The event must be something like this: on click checkbox -> set value -> input6 -> value is ... (calculated) -> drag input_1 into the expression and press ok.