You are here

function hook_homebox_block_edit_form in Homebox 6.2

Same name and namespace in other branches
  1. 6.3 homebox.api.php \hook_homebox_block_edit_form()

Provide a custom block configuration form for a block.

The form will display above the block; keep it concise. Allows users to customize what is shown on their homebox page. For example, number of items shown, switch to a different item, or cutomize details.

For extra validation and processing, use Form API's #validate, #submit and other features.

Parameters

$block: A block oject with at least module and delta properties. module will always match your module name. Use delta if you have different types of configurable blocks.

Return value

A Form API array. Submit buttons, working with AHAH, and saving are handled by homebox.

See also

form.inc

1 function implements hook_homebox_block_edit_form()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

homebox_homebox_block_edit_form in ./homebox.module
2 invocations of hook_homebox_block_edit_form()
homebox_block_edit_form_builder in ./homebox.module
Get an edit form from the implementing module and add the standard buttons and submit handling.
homebox_prepare_block in ./homebox.module
Prepare a block for rendering with theme('homebox_block').

File

./homebox.api.php, line 51
Homebox API

Code

function hook_homebox_block_edit_form($block) {
  $form = array();
  $form['title'] = array(
    '#type' => 'textfield',
    '#title' => t('Title'),
    '#size' => 25,
    '#default_value' => $block->title,
    '#required' => TRUE,
  );
  $form['content'] = array(
    '#type' => 'textarea',
    '#title' => t('Content'),
    '#default_value' => $block->content,
    '#required' => TRUE,
  );
  $form['#validate'][] = 'project_issue_homebox_block_edit_form_validate';
  return $form;
}