示例#1
0
 /**
  * Prepare Form and add elements to form
  *
  * @return $this
  */
 protected function _prepareForm()
 {
     $this->setJsVariablePrefix('shippingAddress');
     parent::_prepareForm();
     $this->_form->addFieldNameSuffix('order[shipping_address]');
     $this->_form->setHtmlNamePrefix('order[shipping_address]');
     $this->_form->setHtmlIdPrefix('order-shipping_address_');
     return $this;
 }
示例#2
0
文件: Form.php 项目: aiesh/magento2
 /**
  * Define form attributes (id, method, action)
  *
  * @return $this
  */
 protected function _prepareForm()
 {
     parent::_prepareForm();
     $this->_form->setId('edit_form');
     $this->_form->setMethod('post');
     $this->_form->setAction($this->getUrl('sales/*/addressSave', array('address_id' => $this->_getAddress()->getId())));
     $this->_form->setUseContainer(true);
     return $this;
 }