if ($useCtrlCities) {
$e[] = array(
'type' => 'select',
- 'req' => true,
+ 'req' => false,
'name' => 'city_id',
'display' => 'City',
'opts' => array('' => '-- Select --') + $this->cities
} else {
$e[] = array(
'type' => 'text',
- 'req' => true,
+ 'req' => false,
'name' => 'city',
'display' => 'City',
'opts' => array('class' => 'text')
}
$e[] = array(
'type' => 'select',
- 'req' => true,
+ 'req' => false,
'name' => 'state_id',
'display' => 'State / Province',
'opts' => array('' => '-- Select --') + $this->states
}
$e[] = array(
'type' => 'text',
- 'req' => true,
+ 'req' => false,
'name' => 'zip',
'display' => 'Zip / Postal Code',
'opts' => array('class' => 'text')
$this->dbh,
$this->tableName
);
+ $values['city_id']
+ = ($values['city_id'])
+ ? $values['city_id']
+ : null;
+ $values['state_id']
+ = ($values['state_id'])
+ ? $values['state_id']
+ : null;
foreach ($values as $k => $v) {
switch ($k) {