Closed (fixed)
Project:
Documentation
Component:
Developer Guide
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
6 May 2006 at 21:28 UTC
Updated:
7 Mar 2008 at 18:28 UTC
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).
| Comment | File | Size | Author |
|---|---|---|---|
| form.inc_19.patch | 812 bytes | ostolop |
Comments
Comment #1
chx commented#submit as been renamed to executes_submit_callback. Nothing to change here.
Comment #2
ostolop commentedOh... sorry about sounding ignorant, but is this documented anywhere? How could one have found out about this?
Comment #3
pwolanin commentedI 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.
Comment #4
chx commentedthis last minute change has not yet been incorporated into the form API reference. It's rarely needed anyways...
Comment #5
pwolanin commentedI'm confused by the discussion above- isn't $form['#submit'] now where one adds additional submit handlers? E.g.:
this doesn't appears at all in the Forms API documentation
Comment #6
ronaldmulero commentedold issue