function hook_signup_pane_info in Signup 6.2
Hook to define panes available to insert into the signup form.
Panes should be provided by callback functions as a FormAPI array. The callback should have the following signature: function my_callback(&$signup_form, &$form_state, $node, $signup, $pane_id, $signup_type = 'auth') See signup_basic_form_form for an example. The values submitted to the form elements defined by this form will be serialized and stored in the {signup_log} table as 'form_data'.
Parameters
$node: (optional) The node being considered for panes. Most modules won't need to look at this, but you may need to only return panes if the node satisfies certain properties.
Return value
An array of possible forms, keyed by a unique ID. Each value is itself an array of data, with the following key-value pairs:
- 'label': (required) The human-readable name of the form.
- 'description': (required) Extra information about the form.
- 'callback': (required) The name of a function.
- 'operations': (optional) A list of links for the user to perform
administrative tasks on this pane, either global or per-node settings.
The format is an unkeyed array of link arrays (suitable for passing
to theme_links).
You may use %nid as a token in your link's href property to
insert the node id of the current signup node.
The following optional keys are also available:
- destination: if set to TRUE, the return destination will be appended to the link as a query string with drupal_get_destination, allowing the user to return to this page directly. Do not use if your link sends the user to a complex series of forms or pages.
- not_defaults: if set to TRUE, this link will not be shown when default signup settings are being edited at admin/settings/signup. Use this when your settings link would be meaningless in this context because it is dependent on the current node.
See also
signup_basic_form_form.
4 functions implement hook_signup_pane_info()
Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.
- signup_basic_form_signup_pane_info in modules/
signup_basic_form/ signup_basic_form.module - Implementation of hook_signup_pane_info().
- signup_pane_example_signup_pane_info in modules/
signup_pane_example/ signup_pane_example.module - Implementation of hook_signup_pane_info().
- signup_profile_signup_pane_info in modules/
signup_profile/ signup_profile.module - Implementation of hook_signup_pane_info().
- signup_webform_signup_pane_info in modules/
signup_webform/ signup_webform.module - Implementation of hook_signup_pane_info().
1 invocation of hook_signup_pane_info()
- signup_node_settings_form in includes/
node_settings.inc - Returns the form for the per-node signup settings.
File
- ./
signup.api.php, line 48 - This file documents the hooks invoked by the Signup module.
Code
function hook_signup_pane_info($node = NULL) {
return array(
'basic' => array(
'label' => 'Basic form',
'description' => 'Collects name and phone number.',
'callback' => 'signup_basic_form_form',
),
);
}