Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages

citystatezip-field.inc.php

Go to the documentation of this file.
00001 <?php
00008 class CityStateZipField extends CollectionField
00009 {
00016     public function __construct($name, Form &$parentForm, array $attribs = array())
00017     {
00018         //first name
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         //make it so.
00026         parent::__construct($name, $parentForm, $attribs);
00027     }
00028 
00033     public function getSqlImpl()
00034     {
00035         return "$this->name = '" . implode(" ", $this->getData()) . "'";
00036     }
00037 }
00038 ?>

Generated on Fri Oct 27 12:26:39 2006 for BaseJumper by doxygen 1.3.9.1