Attach custom ajax to add to cart form?
Hi all,
I have a situation where I need to add a little custom ajax (eg. adding the '#ajax' array) to an add to cart form element for some specific display functionality, but when I look at the $form array from my hook_form_commerce_cart_add_to_cart_form_alter() I cannot actually access any of the line item form elements. For example one of them is rendered on the page as a select list, but I cannot find this anywhere in the $form array. It is like it is rendered into a proper Drupal form array afterwards or something.
The ['line_item_fields'] array is in there but it doesn't contain any of the normal form structure that you can modify with a hook_form_alter.
Can anyone shed some light on how I can pull this off?
Thanks!