mlutfy / ca.bidon.regionlookup

CiviCRM extension to lookup the region of a contact depending on their postcode (or other field).
GNU Affero General Public License v3.0
1 stars 3 forks source link

How to fill-in the standard 'New contact' form city field by postcode? #3

Open zarandras opened 7 years ago

zarandras commented 7 years ago

I wonder how I can use Region lookup to fill in the City field at address #1 on the forms Contacts | New individual | ... . I've tried the following selectors:

.crm_address_1 input#address_1_postal_code
.crm_address_1 input#address_1_city

They seem to match on a certain nesting level but there are many levels and tables in the form so I am not sure I use the right selectors. But I also get a warning by plugin setup (during saving the Region Lookup Settings) so I don't know if it's worth trying other selectors before it is considered:

Warning: Cannot use a scalar value as an array in C:\xampp\apps\wordpress\htdocs\wp-content\plugins\civicrm\civicrm\CRM\Core\Form.php on line 884

I'm using CiviCRM 4.6.10 over WordPress 4.4.4.

Any help, more examples etc are welcome.