Address Field Exclude Northern Ireland Postcodes

Good morning,

The field is linked up to Google Places API, restrict auto complete to UK. However as an insurance provider we’re restricted to offering quotes to England, Scotland and Wales. We’d like to exclude Northern Ireland postcodes, which all start with BT. Running from BT1 to BT94. A postcode would start with 3 or 4 letters/numbers, such as BT1 or BT14, space, then finish with 3 letters/numbers, such as BT1 0BA or BT14 0AA.

Hoping that could have assistance to add code to exclude all BT postcodes, could it be as simple at excluding all postcodes beginning with BT…

Thanks
Steve

Gravity Forms doesn’t include any built-in integration for Google Places API, so I guess you’re using a third-party add-on or custom solution for it. Your best bet would be to contact the author of this integration for advice.

You could also create your own custom validation routine to check field value on submission and make the form fail validation if it’s not what you expected. The following filter can be used for this: gform_field_validation - Gravity Forms Documentation

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.