function uc_addresses_elements in Ubercart Addresses 6.2
Implementation of hook_elements().
Registers address field type, just as in Ubercart 7.x-3.x.
Return value
array A list of input elements that can be used in forms.
See also
uc_addresses_process_address_field()
uc_addresses_validate_address_field()
File
- ./
uc_addresses.module, line 373 - Adds user profile address support to Ubercart.
Code
function uc_addresses_elements() {
$types = array();
$types['uc_addresses_address'] = array(
'#input' => TRUE,
'#tree' => TRUE,
'#process' => array(
'uc_addresses_process_address_field',
),
'#element_validate' => array(
'uc_addresses_validate_address_field',
),
'#theme' => 'uc_addresses_form',
'#uc_addresses_address' => NULL,
// Will get a default value in uc_addresses_process_address_field().
'#uc_addresses_context' => 'default',
'#uc_addresses_required' => TRUE,
'#key_prefix' => '',
);
return $types;
}