public function UcAddressesHiddenFieldHandler::getFormField in Ubercart Addresses 6.2
Same name and namespace in other branches
- 7 handlers/uc_addresses.handlers.inc \UcAddressesHiddenFieldHandler::getFormField()
Implements UcAddressesFieldHandler::getFormField().
Overrides UcAddressesFieldHandler::getFormField
File
- handlers/
uc_addresses.handlers.inc, line 313 - Field handlers for Ubercart Addresses address fields:
Class
- UcAddressesHiddenFieldHandler
- Class for aid/uid field (which can not be set directly).
Code
public function getFormField($form, $form_values) {
$fieldName = $this
->getFieldName();
$fieldValue = $this
->getAddress()
->getField($fieldName);
$default = isset($form_values[$fieldName]) ? $form_values[$fieldName] : $fieldValue;
return array(
$fieldName => array(
'#type' => 'value',
'#title' => $this
->getFieldTitle(),
'#value' => $default,
),
);
}