00001 <?php
00008 class CityStateZipField extends CollectionField
00009 {
00016 public function __construct($name, Form &$parentForm, array $attribs = array())
00017 {
00018
00019 $attribs['fields'] = array(
00020 array('TextField', "city", array_merge($attribs, array('size' => '20', 'maxlength' => '128'))),
00021 array('USStateField', "state", array_merge($attribs, array('mode' => 'abbr'))),
00022 array('TextField', "zip", array_merge($attribs, array('size' => 7, 'regExp' => 'number', 'maxlength' => 5)))
00023 );
00024
00025
00026 parent::__construct($name, $parentForm, $attribs);
00027 }
00028
00033 public function getSqlImpl()
00034 {
00035 return "$this->name = '" . implode(" ", $this->getData()) . "'";
00036 }
00037 }
00038 ?>