0

I'm very new to Drupal so I hope you'll forgive the silly question: where is the server-side code for my AJAX call?

I've read the documentation on the Ajax Framework, but I can't find any instances of #ajax or callback in my code.

Capturing the /system/ajax request yields some interesting form variables:

  • form_build_id: form-cBW24WCJRFxgW5TMHSa-9hQ_tVenToYkx2ObzTgnQKM
  • form_id: commerce_checkout_form_ip_info
  • _triggering_element_name: ief-36484c27df589bd88b009b3e91d079f24f9559cc-add
  • _triggering_element_value: %2B+ADD+MEMBER

(There are lots of others, but those seem like the relevant ones.) I gather that this is a form using the Commerce module, but that doesn't help me much.

Finally, here's the line of code setting up the value of the button that triggers the AJAX call:

$form['customer_profile_ip_info']['field_company_ip_customer_info']['und']['actions']['ief_add']['#value'] = "+ ADD MEMBER";

Hopefully this is enough information to determine what's happening here.

0

1 Answer 1

1

IEF = Inline Entity Form; you should find what you're looking for in that module. If you're new to Drupal the layers of abstraction might make it difficult to understand what's going on though. If there's something in particular you're looking to find out how to alter or understand just update the question.

If you install the Devel module and add

dpm($form['customer_profile_ip_info']['field_company_ip_customer_info']['und'][‌​'actions']['ief_add']); 

to your alter hook you should find the #ajax property.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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