I have a #process function that does something like:
function process($element, $edit)
{
$element['#tree'] = TRUE;
...
$element[0]['delete'] = array('#type' => 'button', '#value' =>
t('Delete'));
...
$element[1]['delete'] = array('#type' => 'button', '#value' =>
t('Delete'));
...
return $element;
}
Expected behavior:
$edit contains some kind of indication of which button was pressed (since using $_POST has been deprecated: http://drupal.org/node/64279#post_op)
Actual behavior:
$edit only contains the values of the other form elements
Comments
Comment #1
Wesley Tanaka commentedI think my code might be missing something.
Comment #2
Wesley Tanaka commentedI added a '#name' to the buttons, and they do indeed show up in $_POST, but not in $edit
Please do let me know if this isn't the correct way to define buttons.
Comment #3
tstoecklerClosing this issue. It's not clear what the problem is. #process functions have nothing to with a submitted button. And the linked upgrade docs show how access to the name of the pressed button in form-related functions.