Shipping address data to be same as billing address

Viewed 27

I have a billing address and shipping address fields. The shipping address fields are hidden unless a user clicks on a checkbox (stimulus) indicating "shipping address same as billing address?"

Using rails, how might one go about copying the text from the billing address to the shipping address when the checkbox is clicked? Ideally allowing this text to still be editable.

0 Answers
Related