[documentation] [Documentation bug] #submit attribute not working as documented (not working at all)

pwolanin drupal-docs at drupal.org
Fri Nov 24 18:02:21 UTC 2006


Issue status update for 
http://drupal.org/node/62222
Post a follow up: 
http://drupal.org/project/comments/add/62222

 Project:      Documentation
 Version:      <none>
 Component:    Developer Guide
 Category:     bug reports
 Priority:     normal
 Assigned to:  Anonymous
 Reported by:  ostolop
 Updated by:   pwolanin
 Status:       active

I'm confused by the discussion above- isn't $form['#submit'] now where
one adds additional submit handlers? E.g.:
function comment_form_alter($form_id, &$form) {
  if ($form_id == 'node_type_form' ) {
    $form['#submit']['comment_workflow_form_submit'] = array();
}


this doesn't appears at all in the Forms API documentation




pwolanin



Previous comments:
------------------------------------------------------------------------

Sat, 06 May 2006 21:28:07 +0000 : ostolop

Attachment: http://drupal.org/files/issues/form.inc_19.patch (812 bytes)

Forms API reference
(http://drupaldocs.org/api/head/file/contributions/docs/developer/topics/...)
says:


#submit
Used by: button, submit
Description: Indicates whether or not button should submit the form.
Values: TRUE or FALSE


However, in forms.inc we have, in theme_button
(http://drupaldocs.org/api/head/function/theme_button), the 'submit'
type is hardcoded. A simple patch is attached to use the #submit
attribute (if set, otherwise continue using the 'submit' type).




------------------------------------------------------------------------

Sat, 06 May 2006 22:05:04 +0000 : chx

#submit as been renamed to executes_submit_callback. Nothing to change
here.




------------------------------------------------------------------------

Sat, 13 May 2006 19:58:15 +0000 : ostolop

Oh... sorry about sounding ignorant, but is this documented anywhere?
How could one have found out about this?




------------------------------------------------------------------------

Sat, 13 May 2006 20:24:51 +0000 : pwolanin

I second the question (and reassigned this as a documentation bug).   
Is the Forms API reference invalid for 4.7 or only for HEAD/4.8?  


BTW, on api.drupal.org, this attribute is still listed, but does not
link to anything:


http://api.drupal.org/api/HEAD/file/developer/topics/api/head/file/contr...


gives a page not found error.




------------------------------------------------------------------------

Sat, 13 May 2006 21:46:21 +0000 : chx

this last minute change has not yet been incorporated into the form API
reference. It's rarely needed anyways...






More information about the documentation mailing list