当前位置: 首页>>代码示例>>PHP>>正文


PHP Zend_Form_Element_Hidden::setValue方法代码示例

本文整理汇总了PHP中Zend_Form_Element_Hidden::setValue方法的典型用法代码示例。如果您正苦于以下问题:PHP Zend_Form_Element_Hidden::setValue方法的具体用法?PHP Zend_Form_Element_Hidden::setValue怎么用?PHP Zend_Form_Element_Hidden::setValue使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Zend_Form_Element_Hidden的用法示例。


在下文中一共展示了Zend_Form_Element_Hidden::setValue方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: frmSender

 public function frmSender($data)
 {
     $sender = new Zend_Dojo_Form_Element_ValidationTextBox('sender_name');
     $sender->setAttribs(array("required" => true, "class" => "fullside", "dojoType" => "dijit.form.ValidationTextBox"));
     $sender_tel = new Zend_Dojo_Form_Element_NumberTextBox('tel');
     $sender_tel->setAttribs(array("class" => "fullside", "dojoType" => "dijit.form.ValidationTextBox"));
     $email = new Zend_Dojo_Form_Element_TextBox('email');
     $email->setAttribs(array("class" => "fullside", "dojoType" => "dijit.form.TextBox"));
     $address = new Zend_Dojo_Form_Element_TextBox('address');
     $address->setAttribs(array("class" => "fullside", "dojoType" => "dijit.form.TextBox"));
     $status = new Zend_Dojo_Form_Element_FilteringSelect('status');
     $status->setAttribs(array("class" => "fullside", "dojoType" => "dijit.form.FilteringSelect", "required" => true));
     $_opt = array(1 => "ប្រើប្រាស់", 0 => "មិនប្រើប្រាស់");
     $status->setMultiOptions($_opt);
     $sender_id = new Zend_Form_Element_Hidden('id');
     if (!empty($data)) {
         $sender_id->setValue($data['sender_id']);
         $sender->setValue($data['sender_name']);
         $sender_tel->setValue($data['tel']);
         $email->setValue($data['email']);
         $address->setValue($data['address']);
         $status->setValue($data['status']);
         //print_r($data);
     }
     $this->addElements(array($sender, $sender_tel, $email, $address, $sender_id, $status));
     return $this;
 }
开发者ID:samlanh,项目名称:currencyms,代码行数:27,代码来源:FrmSender.php

示例2: setupHash

 protected function setupHash()
 {
     $this->hidden = new Zend_Form_Element_Hidden(self::HIDDEN_HASH);
     $this->hidden->setValue($this->formName);
     $this->addElements(array($this->hidden));
     $this->hidden->setDecorators($this->getHiddenDecorators());
 }
开发者ID:varrbor,项目名称:hanuka.lviv.ua,代码行数:7,代码来源:BaseForm.php

示例3: __construct

 public function __construct($parent = null, $options = null)
 {
     parent::__construct($options);
     $parentId = 0;
     if ($parent != null) {
         $parentId = $parent;
     }
     $translate = Zend_Registry::get('Zend_Translate');
     $this->setName('comment_form');
     $this->addElementPrefixPath('Oibs_Decorators', 'Oibs/Decorators/', 'decorator');
     /*						
     $comment_subject = new Zend_Form_Element_Text('comment_subject');
     $comment_subject->setLabel($translate->_("content-view-comment-form-subject"))
     		->setRequired(true)
     		->setAttribs(array(
     			'class' => 'comment_subject'))
     		->addValidators(array(
     			array('NotEmpty', true, array('messages' => array('isEmpty' => 'Tyhjä')))
     		));
     */
     $comment_message = new Zend_Form_Element_Textarea('comment_message');
     $comment_message->setRequired(true)->setAttribs(array('rows' => 10, 'cols' => 58, 'class' => 'comment_textarea'))->addValidators(array(array('NotEmpty', true, array('messages' => array('isEmpty' => 'Tyhjä')))));
     $comment_parent = new Zend_Form_Element_Hidden('comment_parent');
     $comment_parent->setValue($parentId)->setAttribs(array('class' => 'comment_subject'));
     $submit = new Zend_Form_Element_Submit('submit');
     $submit->setLabel($translate->_("submit"));
     $parent_username = new Zend_Form_Element_Hidden('parent_username');
     $this->addElements(array($comment_message, $comment_parent, $submit, $parent_username));
 }
开发者ID:jannev,项目名称:site,代码行数:29,代码来源:CommentForm.php

示例4: init

 /**
  *
  * Edit Group form
  *
  */
 public function init()
 {
     $cname = explode('_', get_class());
     $this->preInit(end($cname));
     // use template file
     $this->setDecorators(array(array('ViewScript', array('viewScript' => 'forms/EditGroup.phtml'))));
     // get group from database
     $request = Zend_Controller_Front::getInstance()->getRequest();
     $group = $request->getParam('name');
     $Profiles = new Application_Model_Profiles();
     $ProfilesMeta = new Application_Model_ProfilesMeta();
     $profile = $Profiles->getProfile($group, false, true);
     $owners_profile = $Profiles->getProfileByField('id', $profile->owner);
     $username_minchars = Zend_Registry::get('config')->get('username_minchars');
     $username_maxchars = Zend_Registry::get('config')->get('username_maxchars');
     // fields
     $id = new Zend_Form_Element_Hidden('id');
     $id->setValue($profile->id);
     $name = new Zend_Form_Element_Text('name');
     $name->setDecorators(array('ViewHelper', 'Errors'))->setLabel($this->translator->translate('Group Name'))->setValue($profile->name)->setIgnore(true)->setAttrib('readonly', true)->setAttrib('class', 'form-control');
     $screenname = new Zend_Form_Element_Text('screen_name');
     $screenname->setDecorators(array('ViewHelper', 'Errors'))->addFilter('StringTrim')->setValue($profile->screen_name)->addValidator('alnum', false, array('allowWhiteSpace' => true))->addValidator('stringLength', false, array($username_minchars, $username_maxchars))->setErrorMessages(array(sprintf($this->translator->translate('Please choose a valid name between %d and %d characters'), $username_minchars, $username_maxchars)))->setLabel($this->translator->translate('Screen Name'))->setRequired(true)->setAttrib('class', 'form-control');
     $description = new Zend_Form_Element_Textarea('description');
     $description->setDecorators(array('ViewHelper', 'Errors'))->setAttrib('COLS', '')->setAttrib('ROWS', '4')->addFilter('StripTags')->setValue($ProfilesMeta->getMetaValue('description', $profile->id))->setLabel($this->translator->translate('About this group'))->setAttrib('class', 'form-control');
     $profile_privacy = new Zend_Form_Element_Select('profile_privacy');
     $profile_privacy->setDecorators(array('ViewHelper', 'Errors'))->setMultiOptions(Zend_Registry::get('group_privacy_array'))->setErrorMessages(array($this->translator->translate('Select group visibility')))->setLabel($this->translator->translate('Select group visibility'))->setRequired(true)->setValue($profile->profile_privacy)->setAttrib('class', 'form-control');
     $is_hidden = new Zend_Form_Element_Checkbox('is_hidden');
     $is_hidden->setDecorators(array('ViewHelper', 'Errors'))->setValue(isset($profile->is_hidden) && $profile->is_hidden == 1 ? 1 : 0)->setLabel($this->translator->translate('Remove?'))->setCheckedValue("1")->setUncheckedValue("0");
     $submit = new Zend_Form_Element_Submit('formsubmit');
     $submit->setDecorators(array('ViewHelper'))->setLabel($this->translator->translate('Save'))->setAttrib('class', 'submit btn btn-default');
     $this->addElements(array($id, $name, $screenname, $profile_privacy, $description, $is_hidden, $submit));
     $this->postInit();
 }
开发者ID:georgepaul,项目名称:socialstrap,代码行数:38,代码来源:EditGroup.php

示例5: init

 public function init()
 {
     $this->setName(strtolower(get_class()));
     $this->setMethod("post");
     $oFormName = new Zend_Form_Element_Hidden("form_name");
     $oFormName->setValue(get_class());
     $oFormName->setIgnore(FALSE)->removeDecorator("Label");
     $this->addElement($oFormName);
     $oFormSliderEditId = new Zend_Form_Element_Hidden("slider_edit_id");
     $oFormSliderEditId->setValue(0);
     $oFormSliderEditId->setIgnore(FALSE)->removeDecorator("Label");
     $this->addElement($oFormSliderEditId);
     $oSliderName = new Zend_Form_Element_Text("name");
     $oSliderName->setLabel("Nazwa slidera:");
     $oSliderName->addValidator(new Zend_Validate_StringLength(array("min" => 3, "max" => 45)));
     $oSliderName->setRequired(TRUE);
     $oSliderName->setAttrib("class", "valid");
     $this->addElement($oSliderName);
     $this->addElement("hash", "csrf_token", array("ignore" => false, "timeout" => 7200));
     $this->getElement("csrf_token")->removeDecorator("Label");
     $oSubmit = $this->createElement("submit", "submit");
     $oSubmit->setLabel("Zapisz");
     $this->addElement($oSubmit);
     $oViewScript = new Zend_Form_Decorator_ViewScript();
     $oViewScript->setViewModule("admin");
     $oViewScript->setViewScript("_forms/_defaultform.phtml");
     $this->clearDecorators();
     $this->setDecorators(array(array($oViewScript)));
     $oElements = $this->getElements();
     foreach ($oElements as $oElement) {
         $oElement->setFilters($this->_aFilters);
         $oElement->removeDecorator("Errors");
     }
 }
开发者ID:lstaszak,项目名称:zf_zk_aleph,代码行数:34,代码来源:AddSlider.php

示例6: init

 public function init()
 {
     $this->setName(strtolower(get_class()));
     $this->setMethod("post");
     $oFormName = new Zend_Form_Element_Hidden("form_name");
     $oFormName->setValue(get_class());
     $oFormName->setIgnore(FALSE)->removeDecorator("Label");
     $this->addElement($oFormName);
     $oTableName = new Zend_Form_Element_Multiselect("table_name");
     $oTableName->addMultiOptions($this->_aTableName);
     $oTableName->addValidator(new Zend_Validate_InArray(array_keys($this->_aTableName)));
     $oTableName->setRequired(FALSE);
     $oTableName->setLabel("Nazwa tabeli:");
     $oTableName->setAttrib("class", "multiselect");
     $this->addElement($oTableName);
     $this->addElement("hash", "csrf_token", array("ignore" => false, "timeout" => 7200));
     $this->getElement("csrf_token")->removeDecorator("Label");
     $oSubmit = $this->createElement("submit", "submit");
     $oSubmit->setLabel("Zapisz");
     $this->addElement($oSubmit);
     $oViewScript = new Zend_Form_Decorator_ViewScript();
     $oViewScript->setViewModule("admin");
     $oViewScript->setViewScript("_forms/_defaultform.phtml");
     $this->clearDecorators();
     $this->setDecorators(array(array($oViewScript)));
     $oElements = $this->getElements();
     foreach ($oElements as $oElement) {
         $oElement->setFilters($this->_aFilters);
         $oElement->removeDecorator("Errors");
     }
 }
开发者ID:lstaszak,项目名称:zf_zk_aleph,代码行数:31,代码来源:TrancateDb.php

示例7: init

 /**
  * Form initialization
  *
  * @return void
  */
 public function init()
 {
     $url = Zend_Controller_Front::getInstance()->getRouter()->assemble(array('module' => "flex", 'controller' => 'panel', 'action' => 'form'), 'default');
     $this->setAction($url)->setMethod('post');
     $this->setLegend(sprintf(Zoo::_('Edit %s'), $this->target->name));
     $name = new Zend_Form_Element_Text('name');
     $name->setLabel('Name')->setRequired(true);
     $name->setDescription('Administration-side identifier');
     $title = new Zend_Form_Element_Text('title');
     $title->setLabel('Title');
     $title->setDescription('User-visible title of panel');
     $layout = new Zend_Form_Element_Select('layout');
     $layout->setLabel('Layout');
     $layout->setMultiOptions($this->getLayouts());
     $category = new Zend_Form_Element_Text('category');
     $category->setLabel('Category');
     $category->setDescription('Administration-side grouping');
     $category->setRequired(true);
     $submit = new Zend_Form_Element_Submit('save');
     $submit->setLabel('save')->setOrder(100);
     $this->addElements(array($name, $title, $layout, $category));
     $legend = Zoo::_("Basic options");
     $this->addDisplayGroup(array('name', 'title', 'layout', 'category'), 'block_form', array('legend' => $legend));
     $this->addElement($submit);
     if ($this->target->id > 0) {
         $id_ele = new Zend_Form_Element_Hidden('id');
         $id_ele->setValue(intval($this->target->id));
         $this->addElement($id_ele);
     }
     $this->populate($this->target->toArray());
 }
开发者ID:BGCX261,项目名称:zoocms-svn-to-git,代码行数:36,代码来源:Panel.php

示例8: setValue

 public function setValue($value)
 {
     if (null === $this->_value) {
         parent::setValue($value);
     }
     return $this;
 }
开发者ID:hausdesign,项目名称:zf-library,代码行数:7,代码来源:Note.php

示例9: __construct

 public function __construct($options = null, $data = null)
 {
     parent::__construct($options);
     $translate = Zend_Registry::get('Zend_Translate');
     $this->setDisableLoadDefaultDecorators(true);
     $this->addDecorator('FormElements')->addDecorator('HtmlTag', array('tag' => 'div'))->addDecorator('Form');
     $this->setName('send_privmsg_form');
     $this->addElementPrefixPath('Oibs_Validators', 'OIBS/Validators/', 'validate');
     $this->addElementPrefixPath('Oibs_Decorators', 'Oibs/Decorators/', 'decorator');
     $header = new Zend_Form_Element_Text('privmsg_header');
     $header->setLabel($translate->_("privmsg-header"))->setRequired(true)->setAttrib('size', 53)->addValidators(array(array('StringLength', true, array(1, 255, 'messages' => array('stringLengthTooShort' => 'field-too-short', 'stringLengthTooLong' => 'field-too-long')))))->setDecorators(array('PrivMsgTextFieldDecorator'));
     $message = new Zend_Form_Element_Textarea('privmsg_message');
     $message->setLabel($translate->_("privmsg-message"))->setRequired(true)->setAttrib('rows', 6)->setAttrib('cols', 40)->addValidators(array(array('NotEmpty', true, array('messages' => array('isEmpty' => 'field-empty'))), array('StringLength', true, array(1, 1000, 'messages' => array('stringLengthTooLong' => 'field-too-long'))), new Oibs_Validators_MessageTime('')))->setDecorators(array('PrivMsgMessageDecorator'));
     $charCount = new Oibs_Form_Element_Note('charCount');
     $charCount->setValue("Character limit: 0/1000")->removeDecorator('Label')->addDecorator('HtmlTag', array('tag' => 'div', 'id' => 'privmsg-charcount', 'class' => 'left'));
     $overlimit = new Oibs_Form_Element_Note('overlimit');
     $overlimit->setValue("Characters over the limit will be cut.")->removeDecorator('Label')->addDecorator('HtmlTag', array('tag' => 'div', 'id' => 'privmsg-charcount-cut', 'class' => 'left', 'style' => 'display: none'));
     $clear = new Oibs_Form_Element_Note('clear');
     $clear->setValue("")->removeDecorator('Label')->addDecorator('HtmlTag', array('tag' => 'div', 'class' => 'clear'));
     $sender_id = new Zend_Form_Element_Hidden('privmsg_sender_id');
     $sender_id->setValue($data['sender_id'])->removeDecorator('DtDdWrapper');
     $receiver_id = new Zend_Form_Element_Hidden('privmsg_receiver_id');
     $receiver_id->setValue($data['receiver_id'])->removeDecorator('DtDdWrapper');
     // Form submit buttom form element
     $submit = new Zend_Form_Element_Submit('privmsg_submit');
     $submit->setLabel($translate->_("privmsg-send"))->removeDecorator('DtDdWrapper');
     $this->addElements(array($header, $message, $charCount, $overlimit, $clear, $sender_id, $receiver_id, $submit));
 }
开发者ID:jannev,项目名称:site,代码行数:28,代码来源:PrivMsgForm.php

示例10: addProServiceCategory

 public function addProServiceCategory($data = null)
 {
     $_title = new Zend_Dojo_Form_Element_ValidationTextBox('servicetype_title');
     $_title->setAttribs(array('dojoType' => $this->tvalidate, 'class' => 'fullside', 'required' => 'true'));
     $_tem_desc = new Zend_Dojo_Form_Element_TextBox('item_desc');
     $_tem_desc->setAttribs(array('dojoType' => $this->text, 'required' => 'true', 'class' => 'fullside'));
     $_status = new Zend_Dojo_Form_Element_FilteringSelect('sertype_status');
     $_status->setAttribs(array('dojoType' => $this->filter, 'class' => 'fullside'));
     $_status_opt = array(1 => $this->tr->translate("ACTIVE"), 0 => $this->tr->translate("DACTIVE"));
     $_status->setMultiOptions($_status_opt);
     $_type = new Zend_Dojo_Form_Element_FilteringSelect('ser_type');
     $_status_type = array(1 => $this->tr->translate("SERVICE"), 2 => $this->tr->translate("PROGRAM"));
     $_type->setMultiOptions($_status_type);
     $_type->setAttribs(array('dojoType' => $this->filter, 'class' => 'fullside'));
     $_id = new Zend_Form_Element_Hidden('id');
     $_id->setAttribs(array('dojoType' => $this->text));
     if ($data != null) {
         $_id->setValue($data['id']);
         $_title->setValue($data['title']);
         $_tem_desc->setValue($data['item_desc']);
         $_status->setValue($data['status']);
         $_type->setValue($data['type']);
     }
     $this->addElements(array($_title, $_tem_desc, $_status, $_type, $_id));
     return $this;
 }
开发者ID:Bornpagna,项目名称:guesehouse,代码行数:26,代码来源:FrmPopupGlobal.php

示例11: __construct

 public function __construct($options = null)
 {
     parent::__construct($options);
     $translate = Zend_Registry::get('Zend_Translate');
     $this->setName('process_image_form');
     //$this->setAction($actionUrl);
     /*
     $this->addElementPrefixPath('Oibs_Decorators', 
     						'Oibs/Decorators/',
     						'decorator');
     */
     $this->removeDecorator('DtDdWrapper');
     // Hidden form element elements (values will be set with javascript on processimage.phtml)
     $c_x = new Zend_Form_Element_Hidden('c_x');
     $c_x->setValue('0')->removeDecorator('label')->removeDecorator('HtmlTag');
     $c_y = new Zend_Form_Element_Hidden('c_y');
     $c_y->setValue('0')->removeDecorator('label')->removeDecorator('HtmlTag');
     $c_w = new Zend_Form_Element_Hidden('c_w');
     $c_w->setValue('0')->removeDecorator('label')->removeDecorator('HtmlTag');
     $c_h = new Zend_Form_Element_Hidden('c_h');
     $c_h->setValue('0')->removeDecorator('label')->removeDecorator('HtmlTag');
     // Form submit buttom element
     $submit = new Zend_Form_Element_Submit('sendcoords');
     $submit->setLabel($translate->_("account-processimage-save"));
     // Add elements to form
     $this->addElements(array($c_x, $c_y, $c_w, $c_h, $submit));
 }
开发者ID:jannev,项目名称:site,代码行数:27,代码来源:ProcessImageForm.php

示例12: init

 public function init()
 {
     $this->setName(strtolower(get_class()));
     $this->setMethod("post");
     $oFormName = new Zend_Form_Element_Hidden("form_name");
     $oFormName->setValue(get_class());
     $oFormName->setIgnore(FALSE)->removeDecorator("Label");
     $this->addElement($oFormName);
     $oTranslation = new Zend_Form_Element_Select("translation");
     $oTranslation->setLabel("Tłumaczenie:");
     $oTranslation->setRequired(TRUE)->setAttrib("class", "valid");
     $oTranslation->addMultiOptions($this->_aAllLang);
     $this->addElement($oTranslation);
     $this->addElement("hash", "csrf_token", array("ignore" => false, "timeout" => 7200));
     $this->getElement("csrf_token")->removeDecorator("Label");
     $oSubmit = $this->createElement("submit", "submit");
     $oSubmit->setLabel("Dalej");
     $this->addElement($oSubmit);
     $oViewScript = new Zend_Form_Decorator_ViewScript();
     $oViewScript->setViewModule("admin");
     $oViewScript->setViewScript("_forms/lang.phtml");
     $this->clearDecorators();
     $this->setDecorators(array(array($oViewScript)));
     $oElements = $this->getElements();
     foreach ($oElements as $oElement) {
         $oElement->setFilters($this->_aFilters);
         $oElement->removeDecorator("Errors");
     }
 }
开发者ID:lstaszak,项目名称:zf_zk_aleph,代码行数:29,代码来源:Lang.php

示例13: init

 public function init()
 {
     $this->setMethod('post')->setAttrib('id', 'frmVenta')->setAttrib('style', 'width: 300px;margin:auto;');
     // Producto
     $e = new Zend_Form_Element_Select('id_producto');
     $e->setLabel('Producto');
     $e->setRequired();
     $_producto = new Application_Model_Producto();
     $e->addMultiOption(-1, '--Producto--');
     $e->addMultiOptions($_producto->getComboValues());
     $e->addValidator(new Zend_Validate_InArray($_producto->getComboValidValues()));
     $this->addElement($e);
     // Cantidad
     $e = new Zend_Form_Element_Text('cantidad');
     $e->setLabel('Cantidad');
     $e->setRequired();
     $e->addValidator(new Zend_Validate_Int(new Zend_Locale('US')));
     $e->addValidator(new Zend_Validate_GreaterThan(0));
     $e->addValidator(new Zend_Validate_LessThan(100));
     $this->addElement($e);
     // AddVentaDetalles
     $e = new Zend_Form_Element_Hidden('is_detalle');
     $e->setValue(true);
     $e->setRequired();
     $this->addElement($e);
     //Submit
     $e = new Zend_Form_Element_Submit('submit');
     $e->setLabel('Agregar');
     $this->addElement($e);
 }
开发者ID:helmutpacheco,项目名称:ventas,代码行数:30,代码来源:VentaDetalle.php

示例14: FrmGeneraljurnal

 public function FrmGeneraljurnal($data = null)
 {
     $Brance = new Zend_Dojo_Form_Element_FilteringSelect('branch_id');
     $Brance->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect', 'class' => 'fullside', 'required' => true, 'onchange' => 'getJurnalcode();'));
     $db = new Application_Model_DbTable_DbGlobal();
     $rows = $db->getAllBranchName();
     $options = '';
     if (!empty($rows)) {
         foreach ($rows as $row) {
             $options[$row['br_id']] = $row['branch_namekh'];
         }
     }
     $rows = $db->getAllBranchName();
     $options = array('' => '---Select Branch---');
     if (!empty($rows)) {
         foreach ($rows as $row) {
             $options[$row['br_id']] = $row['branch_namekh'];
         }
     }
     $Brance->setMultiOptions($options);
     $_currency_type = new Zend_Dojo_Form_Element_FilteringSelect('currency_type');
     $_currency_type->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect', 'class' => 'fullside'));
     $opt = $db->getVewOptoinTypeByType(15, 1, 3, 1);
     $_currency_type->setMultiOptions($opt);
     $_currency_type->setValue(2);
     $parent = new Zend_Dojo_Form_Element_FilteringSelect('parent');
     $parent->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect', 'class' => 'fullside', 'required' => true, 'onchange' => 'getAllAccountNameByParents();'));
     $db = new Accounting_Model_DbTable_DbChartaccount();
     $option = $db->getAllchartaccount(3, 1);
     $parent->setMultiOptions($option);
     $Add_Date = new Zend_Dojo_Form_Element_DateTextBox('add_date');
     $Add_Date->setAttribs(array('dojoType' => 'dijit.form.DateTextBox', 'class' => 'fullside', 'required' => true));
     $Add_Date->setValue(date('Y-m-d'));
     $Account_Number = new Zend_Dojo_Form_Element_TextBox('journal_code');
     $Account_Number->setAttribs(array('dojoType' => 'dijit.form.TextBox', 'class' => 'fullside', 'readOnly' => 'readOnly', 'required' => 'true'));
     $invoice = new Zend_Dojo_Form_Element_TextBox('invoice');
     $invoice->setAttribs(array('dojoType' => 'dijit.form.TextBox', 'class' => 'fullside'));
     $Note = new Zend_Dojo_Form_Element_TextBox('note');
     $Note->setAttribs(array('dojoType' => 'dijit.form.TextBox', 'class' => 'fullside'));
     $Debit = new Zend_Dojo_Form_Element_NumberTextBox('debit');
     $Debit->setAttribs(array('dojoType' => 'dijit.form.NumberTextBox', 'class' => 'fullside', 'required' => 1, 'readonly' => 'readonly'));
     // 		$Debit->setValue(0);
     $Credit = new Zend_Dojo_Form_Element_NumberTextBox('credit');
     $Credit->setAttribs(array('dojoType' => 'dijit.form.NumberTextBox', 'class' => 'fullside', 'required' => 1, 'readonly' => 'readonly'));
     $id = new Zend_Form_Element_Hidden('id');
     if ($data != null) {
         $id->setValue($data['id']);
         $Brance->setValue($data['branch_id']);
         $Account_Number->setValue($data['journal_code']);
         $invoice->setValue($data['receipt_number']);
         $_currency_type->setValue($data['currency_id']);
         $Note->setValue($data['note']);
         $Add_Date->setValue($data['date']);
         $Debit->setValue($data['debit']);
         $Credit->setValue($data['credit']);
     }
     // 		$Credit->setValue(0);
     $this->addElements(array($id, $invoice, $_currency_type, $parent, $Add_Date, $Account_Number, $Note, $Debit, $Credit, $Brance));
     return $this;
 }
开发者ID:samlanh,项目名称:lnms,代码行数:60,代码来源:FrmGeneraljurnal.php

示例15: FrmAddHoliday

 public function FrmAddHoliday($_data = null)
 {
     $_holiday_name = new Zend_Dojo_Form_Element_TextBox('holiday_name');
     $_holiday_name->setAttribs(array('dojoType' => $this->tvalidate, 'required' => 'true', 'class' => 'fullside'));
     $_startdate = new Zend_Dojo_Form_Element_DateTextBox('start_date');
     $_startdate->setAttribs(array('dojoType' => $this->date, 'required' => 'true', 'class' => 'fullside', 'onchange' => 'CalculateDate();'));
     $date = date("Y-m-d");
     $_startdate->setValue($date);
     $_enddate = new Zend_Dojo_Form_Element_DateTextBox('end_date');
     $_enddate->setAttribs(array('dojoType' => $this->date, 'required' => 'true', 'class' => 'fullside'));
     $_date = date("Y-m-d");
     $_enddate->setValue($_date);
     $_amount_day = new Zend_Dojo_Form_Element_NumberTextBox('amount_day');
     $_amount_day->setAttribs(array('dojoType' => 'dijit.form.NumberTextBox', 'required' => 'true', 'class' => 'fullside', 'onkeyup' => 'CalculateDate();'));
     $_status = new Zend_Dojo_Form_Element_FilteringSelect('status');
     $_status->setAttribs(array('dojoType' => $this->filter, 'class' => 'fullside'));
     $_status_opt = array(1 => $this->tr->translate("ACTIVE"), 0 => $this->tr->translate("DACTIVE"));
     $_status->setMultiOptions($_status_opt);
     $_id = new Zend_Form_Element_Hidden('id');
     if (!empty($_data)) {
         $_holiday_name->setValue($_data['holiday_name']);
         $_startdate->setValue($_data['start_date']);
         $_amount_day->setValue($_data['amount_day']);
         $_enddate->setValue($_data['end_date']);
         $_status->setValue($_data['status']);
         $_id->setValue($_data['id']);
     }
     $this->addElements(array($_id, $_holiday_name, $_startdate, $_enddate, $_amount_day, $_status));
     return $this;
 }
开发者ID:samlanh,项目名称:currencyms,代码行数:30,代码来源:FrmHoliday.php


注:本文中的Zend_Form_Element_Hidden::setValue方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。