There may be more graceful ways to code this (I'm new to formcalc). If anyone has a better way please chime in. I'm posting it because I didn't find any resources on it and thought it might save someone else some time.
Billing Address field names:
bill_addr
bill_city
bill_state
bill_zip
Check box name:
same_addr
Check box:
on/off
Check box binding:
On = 1
Off = 0
Mailing Address field names:
mail_addr
mail_city
mail_state
mail_zip
Mailing Address field codes:
mail_addr:
if (same_addr > 0) then (bill_addr) else $.rawValue = $.rawValue endif
mail_city:
if (same_addr > 0) then (bill_city) else $.rawValue = $.rawValue endif
mail_state:
if (same_addr > 0) then (bill_state) else $.rawValue = $.rawValue endif
mail_zip:
if (same_addr > 0) then (bill_zip) else $.rawValue = $.rawValue endif
explanation -- if the “same_addr” box is checked it’s “on” with a value equal to 1 (greater than zero) then the billing field will populate with data from its corresponding mailing field, or the “else” statement means “it is what it is”
Let me know if this helps.
LK