Enable postcode lookup on civicrm profiles and drupal user registration screen
The work enables the postcode lookup functionality on CiviCRM profiles (accessible via the civicrm/profile/* URL) and Drupal user registration screen when a CiviCRM profile is embedded.
Merge request reports
Activity
mentioned in commit 3414adcb
@deepak.srivastava getting this error after applying this patch when accessing a contribution page. My drupal user registration is turned off.
Error: Class "Drupal" not found in civicrmpostcodelookup_civicrm_buildForm() (line 119 of /home/iskcon-cmm-uat/htdocs/cmm-uat.iskcon/sites/default/files/civicrm/ext/contrib/ukpostcodes/civicrmpostcodelookup.php).
Edited by tapashHi @tapash Is it Drupal 7 that you getting the error for? The code is for Drupal8+.
Try changing this line:
if (strpos(CRM_Core_Config::singleton()->userFramework, 'Drupal') === 0) {
toif (strpos(CRM_Core_Config::singleton()->userFramework, 'Drupal8') === 0) {
See if that resolves the error for D7.
I am on D7 @deepak.srivastava
@deepak.srivastava the "Search Postcode" field doesnt appear on reserved profile, for example ID 4.
Steps to reproduce: Go here /civicrm/admin/uf/group/field?reset=1&action=browse&gid=4
Add street address, city and postcode. When this profile is used the "Search Postcode" input field is not visible on the form.
Edited by tapash