Title: Gravity Forms Address Block Bug
Last modified: March 21, 2017

---

# Gravity Forms Address Block Bug

 *  [Insight Dezign](https://wordpress.org/support/users/insightdezign/)
 * (@insightdezign)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/gravity-forms-address-block-bug/)
 * Gravity forms has a built in Address block that is made up of multiple fields
   in an array. When using the API and mapping these fields to Salesforce all works
   fine unless 1 or more fields is left empty. In that case the full array of field
   data is attempted to pass to the mapped location in salesforce. This often leads
   to errors. Sometimes a type conflict more often than not a string length exception.
 * Because Gravity forms supports International addresses as well, not all address
   block fields are required even when the block is set as required. This allows
   users to end up leaving a field empty. For example the postal code or state is
   often left empty on international entries. The form tries to create a salesforce
   entry but fails because the string is too long for the field in Salesforce.
 * I think this needs to be addressed. Either allow the field to pass blank without
   using the array of data or set an option in the settings to turn this on or off.
   If you can point me to the spot in the plugin where this code might be I could
   attempt to fix it.

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [efkwp](https://wordpress.org/support/users/efkwp/)
 * (@efkwp)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/gravity-forms-address-block-bug/#post-8944547)
 * We don’t have this problem, as we make all the displayed fields required. You
   could put in a default value for postal code for international addresses.
 * You can also make your own text fields and dropdowns and not use the Address 
   block.
 *  Thread Starter [Insight Dezign](https://wordpress.org/support/users/insightdezign/)
 * (@insightdezign)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/gravity-forms-address-block-bug/#post-8945908)
 * These may be valid workarounds in some situations, but not in our case.
 * -We need to use an address block for credit card payment.
    -The same address 
   block is used for domestic or international users. I could set a default postal
   code and state but it would be visible for everyone and when countries that don’t
   use postal codes or states use the form they would attempt to remove them (if
   visible) or I would have to clear it out in Salesforce when it comes over. -Our
   address blocks are set as required but since international addresses don’t all
   use state or postal code those 2 fields of the address block are not required.
 * I may try the default option for the time being to see if I can avoid failed 
   entry creation in Salesforce, but ideally I would like to see this fixed.
 *  [abbimedia](https://wordpress.org/support/users/abbimedia/)
 * (@abbimedia)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/gravity-forms-address-block-bug/#post-9028538)
 * We have the same issue and circumstances. When a field is left blank, such as
   addess2, or the zip code when an international address is entered, these fields
   are getting stuffed with the entire address in Salesforce.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Gravity Forms Address Block Bug’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/gravity-forms-salesforce_fbfdff.svg)
 * [Gravity Forms Salesforce Add-on](https://wordpress.org/plugins/gravity-forms-salesforce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/gravity-forms-salesforce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/gravity-forms-salesforce/)
 * [Active Topics](https://wordpress.org/support/plugin/gravity-forms-salesforce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/gravity-forms-salesforce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/gravity-forms-salesforce/reviews/)

 * 3 replies
 * 3 participants
 * Last reply from: [abbimedia](https://wordpress.org/support/users/abbimedia/)
 * Last activity: [9 years, 1 month ago](https://wordpress.org/support/topic/gravity-forms-address-block-bug/#post-9028538)
 * Status: not resolved