You are here

function hostingService_example_basic::form in Hostmaster (Aegir) 6

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

modules/hosting/example/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,
  );
}