Guest User

Untitled

a guest
Mar 13th, 2018
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. var fields = $H({
  2. 'address_line_1' : 'billing_address_line_1',
  3. 'address_line_2' : 'billing_address_line_2',
  4. 'city' : 'billing_city',
  5. 'state' : 'billing_state',
  6. 'zip' : 'billing_zip',
  7. 'Field3916726' : 'billing_country'
  8. });
  9. if ($F(this) == 'on') {
  10. // set billing info equal to personal info
  11. fields.each(function(row) {
  12. $(row[1]).setValue($F(row[0]));
  13. });
  14. } else {
  15. // clear billing information
  16. fields.values().map(function(el) {
  17. $(el).setValue('');
  18. });
  19. }
Add Comment
Please, Sign In to add comment