You are here

function format_number_form_user_profile_form_alter in Format Number API 7

Implements hook_form_user_profile_form_alter().

Allows users to individually set their number format.

File

./format_number.module, line 67
This module provides a method to configure number formats (site default and user defined) with configurable decimal point and thousand separators. It also exposes several functions that can be used by other contributed or custom modules to display…

Code

function format_number_form_user_profile_form_alter(&$form, &$form_state) {
  if ($form['#user_category'] == 'account' && variable_get('format_number_user_configurable', 0)) {
    module_load_include('inc', 'format_number', 'format_number.settings');
    $form += format_number_user_settings_form($form_state['user']->data);
    $form['#validate'][] = 'format_number_user_settings_form_validate';
  }
}