You are here

function hostingService_example_basic::form in Hosting 7.3

Same name and namespace in other branches
  1. 6.2 example/hosting_example.service.inc \hostingService_example_basic::form()
  2. 7.4 example/example_service/hosting_example.service.inc \hostingService_example_basic::form()

Extend the server node form.

Modify the reference passed to the method to add additional implementation specific fields to be stored and managed.

Parameters

A reference to the associative array of the subsection of the form: reserved for this service implementation.

Overrides hostingService::form

File

example/example_service/hosting_example.service.inc, line 119
Example service implementation for the hosting front end.

Class

hostingService_example_basic
An implementation of the example service type, registered with hook_hosting_service.

Code

function form(&$form) {

  // REMEMBER TO CALL THE PARENT!
  parent::form($form);
  $form['example_field'] = array(
    '#type' => 'textfield',
    '#title' => t('Example field'),
    '#description' => t('An example field for the user to fill in.'),
    '#size' => 40,
    '#default_value' => $this->example_field ? $this->example_field : 'default value',
    '#maxlength' => 64,
    '#weight' => 5,
  );
}