0

I am customising address field so need to add process function in address field element.

If I am using following code, then its adding process function but then I am not able to call protected function which are defined in address class in address field module.

$info['address']['#process'][] = 'custom_feature_address_element_process';

If I am using following code, then its not working.

$info['address']['#process'][]  = array(0 => 'Drupal\customaddress\Element\CustomAddress', 1 => 'customprocessAddress');
  • Which class are you overriding? – oknate Aug 17 '17 at 17:32
  • I am overriding address class from address field module – Jayendra Kainthola Aug 17 '17 at 18:15
1

I have fixed the issue using following code.

$info['address']['#process'][]  = 'Drupal\custom_feature\Element\CustomFeature::customprocessAddress';

Naming convention was also issue.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.