From d889032f1bf1de85cd06e2e16a82a68ab055b8cd Mon Sep 17 00:00:00 2001 From: Cappy Popp <356651+cappypopp@users.noreply.github.com> Date: Thu, 7 Jan 2021 10:56:56 -0500 Subject: [PATCH] only set state if in US --- LinkedIn - Demo Form Autofill.html | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/LinkedIn - Demo Form Autofill.html b/LinkedIn - Demo Form Autofill.html index bf95645..375cbfd 100644 --- a/LinkedIn - Demo Form Autofill.html +++ b/LinkedIn - Demo Form Autofill.html @@ -79,9 +79,12 @@ } }); hiddenInputCreator('state', function (newValue) { - mktoForm.setValues({ - State: newValue.toUpperCase() - }); + // only set state if we're in the US + if(mktoForm.getValues()['Country'] === "United States"){ + mktoForm.setValues({ + State: newValue.toUpperCase() + }); + } }); /*['email', 'country'].forEach(function(inputField){