How do I pre-fill contact information in KIMBIA forms?
Are you a KIMBIA customer running an email donation or registration fundraising campaign and you already know your donor’s contact information? If you do and can uniquely identify the user when they load the page, you can pre-fill the contact information in KIMBIA forms so the user doesn’t have to type it.
Some examples of fields you can pre-fill:
- First Name
- Last Name
- Street Address Line 1
- Streed Address Line 2
- City
- State
- Zipcode
- Phone
How to Set Kimbia Contact Profile Values
1) Determine the question.name. Usually, this can be determined by loading the form and getting the name attribute of the input. Do not use other attributes.

Put a Custom Function in the <head> of the web page, using JavaScript.
<script type="text/javascript">function prefill(widget) {// do tasks here.}</script>
2) In your Custom Function, add calls to the widget API to set desired answer values.
widget.setDefaultAnswerValueByQuestionName("questionName", "desired value");
Examples:
widget.setDefaultAnswerValueByQuestionName("FirstName", "Bart");widget.setDefaultAnswerValueByQuestionName("_payment.firstName", "PayFirstNameTest");widget.setDefaultAnswerValueByQuestionName("LastName", "Jones");widget.setDefaultAnswerValueByQuestionName("ContactEmail", "bartjones@mailinator.com");widget.setDefaultAnswerValueByQuestionName('MailingAddress|country', 'US');//NOTE: when working with Addresses, set country first.widget.setDefaultAnswerValueByQuestionName("MailingAddress|street1", "1234 Testing Avenue");widget.setDefaultAnswerValueByQuestionName("MailingAddress|street2", "#2");widget.setDefaultAnswerValueByQuestionName("MailingAddress|city", "Pleasantville");widget.setDefaultAnswerValueByQuestionName("MailingAddress|state", "AL");widget.setDefaultAnswerValueByQuestionName("MailingAddress|zipcode", "78704");widget.setDefaultAnswerValueByQuestionName("Q4J3CDKWLGG", "555-555-5555,");***see notes below
3) Put your snippet in the BODY of the page. Add the &onload= parameter to it that matches the name of your custom function.
<script src="https://widgets.kimbia.com/widgets/form.js?channel=[CAMPAIGN_PREFIX]/[FORM_SUFFIX]&onload=prefill"/>
NOTES:
- When setting Address values, always set country first.
- Field names may change from form to form for the items that are optionally added to Contact Information, like Title and Phone Numbers. So, don’t assume that “Phone” will always work as a randomly generated name is just as likely to be given to a field.