Index: topics/forms_api_reference.html =================================================================== RCS file: /cvs/drupal-contrib/contributions/docs/developer/topics/forms_api_reference.html,v retrieving revision 1.75 diff -u -p -r1.75 forms_api_reference.html --- topics/forms_api_reference.html 6 Jan 2008 02:01:04 -0000 1.75 +++ topics/forms_api_reference.html 6 Jan 2008 03:44:34 -0000 @@ -873,7 +873,7 @@ td {
Description: Format an action button. When the button is pressed, the form will be submitted to Drupal, where it is validated and rebuilt. The submit handler is not invoked.
-Properties: #attributes, #button_type (default: submit), #submit (default: FALSE), #name (default: op), #prefix, #suffix, #type. #value, #weight
+Properties: #ahah, #attributes, #button_type (default: submit), #submit (default: FALSE), #name (default: op), #prefix, #suffix, #type. #value, #weight
Usage example (node.module):
Description: Format a checkbox. Properties: #attributes, #default_value, #description, #prefix, #required, #return_value (default: 1), #suffix, #title, #type. #weight Properties: #ahah, #attributes, #default_value, #description, #prefix, #required, #return_value (default: 1), #suffix, #title, #type. #weight Usage example (contact.module): Description: Format a form submit button with an image. Properties: #attributes, #button_type (default: 'submit'), #submit (default: TRUE), #name (default: 'op'), #prefix, #src, #suffix, #type. #value, #weight Properties: #ahah, #attributes, #button_type (default: 'submit'), #submit (default: TRUE), #name (default: 'op'), #prefix, #src, #suffix, #type. #value, #weight Description: Generate generic markup for display inside forms. Note that there is no need to declare a form element as #type = 'markup', as this is the default type. Description: Format a single-line text field that does not display its contents visibly. Properties: #attributes, #description, #maxlength (default: 30), #prefix, #required, #size (default: 64), #suffix, #title, #type. #weight Properties: #ahah, #attributes, #description, #maxlength (default: 30), #prefix, #required, #size (default: 64), #suffix, #title, #type. #weight Usage example (user.module): Description: Format a radio button. Properties: #attributes, #default_value, #description, #prefix, #required, #suffix, #title, #type. #weight Properties: #ahah, #attributes, #default_value, #description, #prefix, #required, #suffix, #title, #type. #weight Usage example: N/A Description: Format a drop-down menu or scrolling selection box. Properties: #attributes, #default_value, #description, #multiple, #options, #prefix, #required, #suffix, #title, #type. #weight Properties: #ahah, #attributes, #default_value, #description, #multiple, #options, #prefix, #required, #suffix, #title, #type. #weight Usage example (system.module): Description: Format a form submit button. Properties: #attributes, #button_type (default: 'submit'), #submit (default: TRUE), #name (default: 'op'), #prefix, #suffix, #type. #value, #weight Properties: #ahah, #attributes, #button_type (default: 'submit'), #submit (default: TRUE), #name (default: 'op'), #prefix, #suffix, #type. #value, #weight Usage example (locale.module): Description: Format a multiple-line text field. Properties: #attributes, #cols (default: 60), #default_value, #description, #prefix, #required, #suffix, #title, #type. #rows (default: 5), #weight Properties: #ahah, #attributes, #cols (default: 60), #default_value, #description, #prefix, #required, #suffix, #title, #type. #rows (default: 5), #weight Usage example (forum.module): Description: Format a single-line text field. Properties: #attributes, #autocomplete_path (default: FALSE), #default_value, #description, #field_prefix, #field_suffix, #maxlength (default: 128), #prefix, #required, #size (default: 60), #suffix, #title, #type. #weight Properties: #ahah, #attributes, #autocomplete_path (default: FALSE), #default_value, #description, #field_prefix, #field_suffix, #maxlength (default: 128), #prefix, #required, #size (default: 60), #suffix, #title, #type. #weight Usage example (forum.module): Values: String. Possible values: 'click', 'blur', 'change'.
Note that #ahah['event'] does not need to be explicitly specified. Although it can be manually set, usually the default value will be sufficient. For your convenience, the defaults per form element type are repeated here:
- Description: Modify the behavior of the returned HTML from an AHAH request when inserting into the #ahah_wrapper. If not set, the returned HTML will replace the contents of the wrapper element, but it's also possible to use any of the available jQuery operations for DOM manipulation. Values: String. Possible values: 'replace' (default), 'after', 'append', 'before', 'prepend'. Description: If set, this property triggers AHAH behaviors on a form element. This is the Drupal menu path to a callback function which will generate HTML and return the string of HTML to Drupal. The result will be placed in the div specified in #ahah['wrapper']. Values: String containing a Drupal menu path. Usage example (upload.module): #ahah['path'] is set to 'upload/js', which has a menu item defined in the same module. Then the menu hook will call the 'upload_js' function which generates HTML and returns it to original page. Description: Choose either a throbber or progress bar that is displayed while awaiting a response from the callback, and add an optional message. Values: Array. Possible keys: 'type', 'message'. #ahah['progress']['type'] String. Possible values: 'throbber' (default), 'bar'. #ahah['progress']['message'] String. An optional message to the user; should be wrapped with t(). #ahah['progress']['url'] String. The optional callback path to use to determine how full the progress bar is (as defined in progress.js). Only useable when 'type' is 'progress'. Usage example: see above useage in upload.module Description: This property defines the HTML id attribute of an element on the page will server as the destination for HTML returned by an AHAH request. Usually, a div element is used as the wrapper, as it provides the most flexibility for placement of elements before, after, or inside of it's HTML tags. This property is required for using AHAH requests in on a form element. Values: String containg a valid id attribute of an HTML element on the same page.<?php
@@ -885,7 +885,7 @@ td {
checkbox
<?php
@@ -971,7 +971,7 @@ td {
image_button
markup
password
<?php
@@ -1014,7 +1014,7 @@ td {
radio
select
<?php
@@ -1050,7 +1050,7 @@ td {
submit
<?php
@@ -1059,7 +1059,7 @@ td {
textarea
<?php
@@ -1072,7 +1072,7 @@ td {
textfield
<?php
@@ -1146,8 +1146,7 @@ td {
checkbox,
image button,
password,
- radio,
- radios,
+ radio,
select,
submit,
textarea,
@@ -1161,8 +1160,9 @@ td {
#ahah['effect']
@@ -1178,28 +1178,14 @@ td {
-
-
-
#ahah['method']
#ahah['path']
-
+
+
#ahah['progress']
+
+
+
+ #ahah['wrapper']