當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Varien_Data_Form::setEnctype方法代碼示例

本文整理匯總了PHP中Varien_Data_Form::setEnctype方法的典型用法代碼示例。如果您正苦於以下問題:PHP Varien_Data_Form::setEnctype方法的具體用法?PHP Varien_Data_Form::setEnctype怎麽用?PHP Varien_Data_Form::setEnctype使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Varien_Data_Form的用法示例。


在下文中一共展示了Varien_Data_Form::setEnctype方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: _prepareForm

 protected function _prepareForm()
 {
     $form = new Varien_Data_Form();
     $fieldset = $form->addFieldset('base_fieldset', array('legend' => Mage::helper('giftcards')->__('Import Gift Card')));
     $fieldset->addField('file', 'file', array('name' => 'file', 'label' => Mage::helper('giftcards')->__('Path to file for Gift Cards'), 'title' => Mage::helper('giftcards')->__('Path to file for Gift Cards'), 'required' => true));
     $fieldset->addField('delimiter', 'text', array('name' => 'delimiter', 'label' => Mage::helper('giftcards')->__('Value delimiter'), 'title' => Mage::helper('giftcards')->__('Value delimiter'), 'required' => true));
     $fieldset->addField('enclosure', 'text', array('name' => 'enclosure', 'label' => Mage::helper('giftcards')->__('Enclose Values In'), 'title' => Mage::helper('giftcards')->__('Enclose Values In'), 'required' => true));
     $form->setAction($this->getUrl('*/*/saveImport'));
     $form->setMethod('post');
     $form->setId('load_form');
     $form->setEnctype('multipart/form-data');
     $this->setForm($form);
     return parent::_prepareForm();
 }
開發者ID:AleksNesh,項目名稱:pandora,代碼行數:14,代碼來源:Form.php

示例2: _prepareForm

 protected function _prepareForm()
 {
     $form = new Varien_Data_Form();
     /* Create Fieldset*/
     $fieldset = $form->addFieldset("import", array("legend" => Mage::helper("hoosh_marketo")->__(self::LEGEND)));
     /* prepare fields */
     $fieldset->addField("csv", "file", array("name" => "csv_data", "label" => Mage::helper("hoosh_marketo")->__(self::FORM_LABEL), "title" => Mage::helper("hoosh_marketo")->__(self::FORM_LABEL), "required" => true));
     $fieldset->addField("attribute_type", "select", array("name" => "entity_type_code", "label" => Mage::helper("hoosh_marketo")->__("Attribute Type"), "title" => Mage::helper("hoosh_marketo")->__("Attribute Type"), "values" => array(HooshMarketing_Marketo_Model_Lead::ENTITY => "Lead", HooshMarketing_Marketo_Model_Opportunity::ENTITY => "Opportunity"), "required" => true));
     /* prepare form */
     $form->setUseContainer(true);
     $form->setEnctype("multipart/form-data");
     $form->setMethod("post");
     $form->setId('edit_form');
     $form->setAction($this->getUrl('*/*/importPost'));
     $this->setForm($form);
 }
開發者ID:sereban,項目名稱:magento-marketo-integration,代碼行數:16,代碼來源:Form.php

示例3: _prepareForm

 protected function _prepareForm()
 {
     $form = new Varien_Data_Form();
     $fieldset = $form->addFieldset('base_fieldset', array('legend' => Mage::helper('customerprices')->__('Import Settings')));
     $fieldset->addField('file', 'file', array('name' => 'file', 'label' => Mage::helper('customerprices')->__('Path to file'), 'title' => Mage::helper('customerprices')->__('Path to file'), 'required' => true));
     $fieldset->addField('delimiter', 'text', array('name' => 'delimiter', 'label' => Mage::helper('customerprices')->__('Value delimiter'), 'title' => Mage::helper('customerprices')->__('Value delimiter'), 'required' => true));
     $fieldset->addField('enclosure', 'text', array('name' => 'enclosure', 'label' => Mage::helper('customerprices')->__('Enclose Values In'), 'title' => Mage::helper('customerprices')->__('Enclose Values In'), 'required' => true));
     $importConfig = array('file' => '/var/customerprices/customerprices.csv', 'delimiter' => ';', 'enclosure' => '"');
     $form->setValues($importConfig);
     $form->setAction($this->getUrl('*/convert/saveImport'));
     $form->setMethod('post');
     $form->setUseContainer(true);
     $form->setId('edit_form');
     $form->setEnctype('multipart/form-data');
     $this->setForm($form);
     return parent::_prepareForm();
 }
開發者ID:technomagegithub,項目名稱:inmed-magento,代碼行數:17,代碼來源:Form.php

示例4: _prepareForm

 protected function _prepareForm()
 {
     $form = new Varien_Data_Form();
     $fieldset = $form->addFieldset('base_fieldset', array('legend' => Mage::helper('giftcards')->__('Import Gift Cards')));
     $fieldset->addField('file', 'file', array('name' => 'file', 'label' => Mage::helper('giftcards')->__('Select file to import'), 'title' => Mage::helper('giftcards')->__('Select file to import'), 'required' => true));
     $fieldset->addField('import_action', 'select', array('label' => Mage::helper('giftcards')->__('Import Action'), 'name' => 'import_action', 'required' => true, 'values' => array('update' => 'Update on duplicate', 'skip' => 'Skip on duplicate'), 'value' => 'update', 'note' => 'What should be the action to be taken when a duplicated is found?'));
     $fieldset = $form->addFieldset('advanced_fieldset', array('legend' => Mage::helper('giftcards')->__('Advanced Options')));
     $fieldset->addField('delimiter', 'text', array('name' => 'delimiter', 'label' => Mage::helper('giftcards')->__('Value delimiter'), 'title' => Mage::helper('giftcards')->__('Value delimiter'), 'value' => ',', 'required' => true));
     $fieldset->addField('enclosure', 'text', array('name' => 'enclosure', 'label' => Mage::helper('giftcards')->__('Enclose Values In'), 'title' => Mage::helper('giftcards')->__('Enclose Values In'), 'value' => '""', 'required' => true));
     $form->setAction($this->getUrl('*/adminhtml_cardsload/save'));
     $form->setMethod('post');
     $form->setId('edit_form');
     $form->setEnctype('multipart/form-data');
     $form->setUseContainer(true);
     $this->setForm($form);
     return parent::_prepareForm();
 }
開發者ID:AleksNesh,項目名稱:pandora,代碼行數:17,代碼來源:Form.php


注:本文中的Varien_Data_Form::setEnctype方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。