This setting was added by #684846: AJAX triggered by non-submit element fails if any elements are validated. It is an array that provides a 'name' and an optional 'value' (for the case when different buttons have the same 'name', such as "op" or "submit"). These should be the same #name and #value info the of the element that triggers the form submission. #name encodes the parents of the element in it, the same as form_set_error(), i.e. "level1][level2][element", though this is dependent on the value of #tree.
Comments
Comment #1
rfayThanks for the report on this. I'll try to get it in there.
Do you have a use case or some example code I can refer to? I didn't even know about this one. And I worked hard on that issue :-)
Comment #2
rfayI added this to D7 FAPI. Review is appreciated, http://api.drupal.org/api/drupal/developer--topics--forms_api_reference....
Comment #4
anrikun commentedI'm reopening this because the way #ajax['trigger_as'] is documented is absolutely not enough.
I've been scratching my head for hours trying to get it work, with no success.
Comment #5
jhodgdonForm API reference is in the Documentation git repository, so moving this issue there.
Comment #6
avpadernoComment #7
quietone commentedThis is for the Drupal 7 Form API reference. Since Drupal 7 is past end-of-life this is now a "won't fix".
Work on documentation for form elements for supported versions of Drupal is at #2486967: [meta] Move/Create Form Element Documentation and #3313535: [Meta] Improve documentation for Render and Form Elements.
Comment #8
avpaderno