Autofill a form's field using an if condition
I am attempting to set up a script to run that will automatically complete different types of forms with demographic information- so not all forms that will use the script will be the same. I don't need this to be perfect but would like for when a field says either Zip or Zip Code, either would fill with the correct number because the word Zip appears. I'm using a custom script below that works if the field requested is Zip Code:
var zipcodefield = this.getField("Zip Code");
zipcodefield.value = "60690";
I am not sure if there is an if condition for that, and if so, I'm not sure how exactly to set it up. Can anyone help?
