You are here

function sms_valid_admin_test_form in SMS Framework 6.2

Same name and namespace in other branches
  1. 6 modules/sms_valid/sms_valid.admin.inc \sms_valid_admin_test_form()
  2. 7 modules/sms_valid/sms_valid.admin.inc \sms_valid_admin_test_form()

Validation number test form

Parameters

$last_test_validation_number: Number that will appear in the text field.

1 string reference to 'sms_valid_admin_test_form'
sms_valid_menu in modules/sms_valid/sms_valid.module
Implementation of hook_menu()

File

modules/sms_valid/sms_valid.admin.inc, line 446
SMS Framework core module: Admin settings form functions

Code

function sms_valid_admin_test_form(&$form_state, $last_test_validation_number = NULL) {
  $last_number = variable_get('sms_valid_test_last_number', '');
  $test_mode = variable_get('sms_valid_test_mode', 0);
  $form['test_mode'] = array(
    '#type' => 'radios',
    '#title' => 'Validator(s)',
    '#default_value' => $test_mode,
    '#options' => array(
      0 => 'Test against rulesets only. Verbose feedback.',
      1 => 'Test against the main validation function.',
    ),
    '#description' => 'The main validation function includes rulesets (if enabled), the active gateway module and other modules that implement number validation hooks.',
  );
  $form['number'] = array(
    '#type' => 'textfield',
    '#title' => t('Number'),
    '#size' => 20,
    '#maxlength' => 30,
    '#default_value' => $last_number,
    '#description' => 'Examples: 64211234567, 021-123-4567, 21.123.4567<br />Number will be validated using all configured settings and rulesets.',
  );
  $form['validate'] = array(
    '#type' => 'submit',
    '#value' => t('Validate Number'),
  );
  return $form;
}