Multiple Field , same ajax callback
I had a similar issue in Drupal 8. I had one form with multiple entities (not drupal entities) that had an identical subset of fields and each had their own button. My $form_state-&gt;getTriggeringElement() would always show the last of these buttons, no matter which I clicked. My issue was that I was not setting #name on the buttons and they were both defaulting to op (they had the same #name value). Explicitly setting a unique #name for each button resolved my issue.