public function render() { // Get Values for element $name = $this->m_Name; $style = $this->getStyle(); $function = $this->getFunction(); $value = $this->m_Value; $valueArray = explode('=', $value); // Set class information for states if ($this->GetFormObj()->m_Errors[$this->m_Name]) { $function .= "onchange=\"this.className='{$this->m_cssClass}'\""; } else { $function .= "onfocus=\"this.className='{$this->m_cssFocusClass}'\" onblur=\"this.className='{$this->m_cssClass}'\""; } // Set values for dropdown element $this->m_cssClass = $this->m_cssErrorClass = $this->m_cssErrorClass = ''; $this->m_Name .= '[]'; //for array (dropdown, textbox) $this->m_Style = 'float:left; width:95px; margin-right:7px;'; $this->m_Value = $valueArray[0]; //first element of array // Render dropdown element $html = parent::render(); // Generate textbox if (!$valueArray[1]) { $valueArray[1] = $this->getDefaultValue(); } $html .= ' <INPUT NAME="' . $this->m_Name . '" ID="' . $this->m_Name . '" VALUE="' . $valueArray[1] . '"' . " {$style} {$function} />"; // Restore Values and Name for rendering total element $this->m_Value = $value; $this->m_Name = $name; return $html; }
public function getValue() { $value = parent::getValue(); $firstname = BizSystem::clientProxy()->getFormInputs("fld_first_name"); $lastname = BizSystem::clientProxy()->getFormInputs("fld_last_name"); $company = BizSystem::clientProxy()->getFormInputs("fld_company"); $value = str_replace("@@Firstname@@", $firstname, $value); $value = str_replace("@@Lastname@@", $lastname, $value); $value = str_replace("@@Company@@", $company, $value); return $value; }
public function getFromList(&$list, $selectFrom = null) { parent::getFromList($list, $selectFrom); $rawlist = $list; $list = array(); foreach ($rawlist as $item) { if ($this->allowDisplay($item['val'])) { $list[] = $item; } } return; }