public function Field() { $field = new FieldGroup($this->name); $field->setID("{$this->name}_Holder"); list($countryCode, $areaCode, $phoneNumber, $extension) = $this->parseValue(); $hasTitle = false; if ($this->value == "") { $countryCode = $this->countryCode; $areaCode = $this->areaCode; $extension = $this->ext; } if ($this->countryCode !== null) { $field->push(new NumericField($this->name . '[Country]', '+', $countryCode, 4)); } if ($this->areaCode !== null) { $field->push(new NumericField($this->name . '[Area]', '(', $areaCode, 4)); $field->push(new NumericField($this->name . '[Number]', ')', $phoneNumber, 10)); } else { $field->push(new NumericField($this->name . '[Number]', '', $phoneNumber, 10)); } if ($this->ext !== null) { $field->push(new NumericField($this->name . '[Extension]', 'ext', $extension, 6)); } return $field; }
public function Field($properties = array()) { $fields = new FieldGroup($this->name); $fields->setID("{$this->name}_Holder"); list($countryCode, $areaCode, $phoneNumber, $extension) = $this->parseValue(); if ($this->value == "") { $countryCode = $this->countryCode; $areaCode = $this->areaCode; $extension = $this->ext; } if ($this->countryCode !== null) { $fields->push(new NumericField($this->name . '[Country]', '+', $countryCode, 4)); } if ($this->areaCode !== null) { $fields->push(new NumericField($this->name . '[Area]', '(', $areaCode, 4)); $fields->push(new NumericField($this->name . '[Number]', ')', $phoneNumber, 10)); } else { $fields->push(new NumericField($this->name . '[Number]', '', $phoneNumber, 10)); } if ($this->ext !== null) { $fields->push(new NumericField($this->name . '[Extension]', 'ext', $extension, 6)); } $description = $this->getDescription(); if ($description) { $fields->getChildren()->First()->setDescription($description); } foreach ($fields as $field) { $field->setDisabled($this->isDisabled()); $field->setReadonly($this->isReadonly()); } return $fields; }
public function Field() { $field = new FieldGroup($this->name); $field->setID("{$this->name}_Holder"); $valueArr = array(); list($valueArr['BankCode'], $valueArr['BranchCode'], $valueArr['AccountNumber'], $valueArr['AccountSuffix']) = explode(" ", $this->value); $valueArr = self::convert_format_nz($valueArr); $field->push(new NumericField($this->name . '[BankCode]', '', $valueArr['BankCode'], 2)); $field->push(new NumericField($this->name . '[BranchCode]', '', $valueArr['BranchCode'], 4)); $field->push(new NumericField($this->name . '[AccountNumber]', '', $valueArr['AccountNumber'], 8)); $field->push(new NumericField($this->name . '[AccountSuffix]', '', $valueArr['AccountSuffix'], 3)); return $field; }
public function Field() { $field = new FieldGroup($this->name); $field->setID("{$this->name}_Holder"); $valueArr = $this->valueArr; $valueArr = self::convert_format_nz($valueArr); $field->push($n1 = new NumericField($this->name . '[BankCode]', '', $valueArr['BankCode'], 2)); $field->push($n2 = new NumericField($this->name . '[BranchCode]', '', $valueArr['BranchCode'], 4)); $field->push($n3 = new NumericField($this->name . '[AccountNumber]', '', $valueArr['AccountNumber'], 8)); $field->push($n4 = new NumericField($this->name . '[AccountSuffix]', '', $valueArr['AccountSuffix'], 3)); if ($this->tabIndex) { $n1->setTabIndex($this->getTabIndex()); $n2->setTabIndex($this->getTabIndex() + 1); $n3->setTabIndex($this->getTabIndex() + 2); $n4->setTabIndex($this->getTabIndex() + 3); } return $field; }