Form constructor for banning an IP address.
string $default_ip: An IP address to ban, used as default value.
function ban_ip_form($form, &$form_state, $default_ip) {
$form['ip'] = array(
'#title' => t('IP address'),
'#type' => 'textfield',
'#size' => 48,
'#maxlength' => 40,
'#default_value' => $default_ip,
'#description' => t('Enter a valid IP address.'),
);
$form['actions'] = array(
'#type' => 'actions',
);
$form['actions']['submit'] = array(
'#type' => 'submit',
'#value' => t('Add'),
);
return $form;
}