function addressfield_format_name_oneline_generate in Address Field 7
Format callback.
See also
CALLBACK_addressfield_format_callback()
1 string reference to 'addressfield_format_name_oneline_generate'
- name-oneline.inc in plugins/
format/ name-oneline.inc
File
- plugins/
format/ name-oneline.inc, line 20
Code
function addressfield_format_name_oneline_generate(&$format, $address) {
$format['name_block'] = array(
'#type' => 'addressfield_container',
'#attributes' => array(
'class' => array(
'addressfield-container-inline',
'name-block',
),
),
'#weight' => -100,
// The addressfield is considered empty without a country, hide all fields
// until one is selected.
'#access' => !empty($address['country']),
);
$format['name_block']['name_line'] = array(
'#title' => t('Full name'),
'#tag' => 'div',
'#attributes' => array(
'class' => array(
'name-block',
),
'autocomplete' => 'name',
),
'#size' => 30,
'#maxlength' => 255,
'#required' => TRUE,
);
}