小编Sup*_*t M的帖子

$ this-> getRequest() - > getPost()在magento后端表单提交中返回空数组

我正在创建一个magento自定义管理模块和一个表单.我想更新此表单但不更新.在Controller中,在SaveAction()I 下打印$this->getRequest()->getPost()并获取空数组.请帮我.下面的代码表格偏差..

     protected function _prepareForm() {
    $form = new Varien_Data_Form(array(
                'id' => 'edit_form1',
                'action' => $this->getUrl('*/*/save', array('id' => $this->getRequest()->getParam('id'))),
                'method' => 'post',
                'enctype' => 'multipart/form-data'
                    )
    );

    $form->setUseContainer(true);
    $this->setForm($form);
    return parent::_prepareForm();
}
Run Code Online (Sandbox Code Playgroud)

并创建一个来自字段集

         protected function _prepareForm() {
    $form = new Varien_Data_Form();
    $this->setForm($form);
    $fieldset = $form->addFieldset('qbanner_form', array('legend' => Mage::helper('qbanner')->__('Art  information')));

    $fieldset->addField('name', 'text', array(
        'label' => Mage::helper('catalog')->__('Product'),
        'required' => false,
        'name' => 'name',
    ));
    $fieldset->addField('artist_name', 'text', array(
        'label' => Mage::helper('catalog')->__('Artist Name'),
       // 'name' => 'artist_name',
        'value' => Mage::helper('catalog')->__('Art …
Run Code Online (Sandbox Code Playgroud)

forms magento magento-1.7

8
推荐指数
1
解决办法
2万
查看次数

表单标签从Bootstrap模式自动删除

在默认的magento 1.9版本中,我遇到了模式弹出窗口的问题.

它工作正常,但form标签正在自动删除.当我查看页面源时,form标签就在那里.我不知道我做错了什么.

<a data-toggle="modal" href="#myModal" class="btn btn-primary">Launch modal</a>
<div class="modal" id="myModal">
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
        <h4 class="modal-title">Modal title</h4>
      </div>
      <div class="modal-body">
        <form id="modalForm" name="modalForm" action="/test" method="post">
          <input type="text" name="text" />
        </form>
        Content for the dialog / modal goes here.
      </div>
      <div class="modal-footer">
        <a href="#" data-dismiss="modal" class="btn">Close</a>
        <a href="#" class="btn btn-primary">Save changes</a>
      </div>
    </div>
  </div>
</div>
Run Code Online (Sandbox Code Playgroud)

小提琴演示

有帮助吗?

html twitter-bootstrap magento-1.9

4
推荐指数
1
解决办法
3644
查看次数

文本框上的jquery keyup事件获取id

我已经建立的HTML形式,其中动态生成的动态ID(例如,一些输入字段id_1id_2id_3等等)。现在我想keyup在每个输入框上创建一个事件。

这是我的 html 文件

<div id="addinput">
    <div id="innneraddinput">
        <div class="inputDivId">
            <input class="search" id="searchid" type="text" size="30" name="p_new" value="" placeholder="" />
        </div>
        <div class="inputDivId">
            <input type="text" id="p_new" size="10" name="p_new" value="" placeholder="" />
        </div>
        <div class="inputDivId">
            <input type="text" id="p_new" size="10" name="p_new" value="" placeholder="" />
        </div>
        <div class="inputDivId">
            <input type="text" id="p_new" size="10" name="p_new" value="" placeholder="" />
        </div>
        <div class="inputDivId">
            <input type="text" id="p_new" size="10" name="p_new" value="" placeholder="" />
        </div>
        <div class="inputDivId">
            <input type="text" id="p_new" size="15" name="p_new" value="" …
Run Code Online (Sandbox Code Playgroud)

html javascript jquery

2
推荐指数
1
解决办法
8275
查看次数