Сбросить Выбрать значения после автоматической отправки - PullRequest
1 голос
/ 10 октября 2019

У меня есть эта контактная форма и я пытаюсь сбросить значения по умолчанию. Когда я использую форму и выбираю значения, я автоматически перенаправляюсь на страницу продукта, но выбранные значения не сбрасываются в значения по умолчанию (в моем случае пустое поле)!

Вот весь мой код:

    <form method="post" action="<?php echo $this->getActionUrl() ?>"
      location="<?php echo $this->getLocation() . ' ' . $this->getCmsId() ?>"
      class="<?php echo $this->isHide() ? 'amfinder-hide' : '' ?>">
    <input type="hidden" name="finder_id" value="<?php echo $this->getId() ?>"/>
    <input type="hidden" name="back_url" value="<?php echo $this->getBackUrl() ?>"/>
   <input type="hidden" name="reset_url" value="<?php echo $this->getResetUrl() ?>"/>
    <input type="hidden" name="category_id" value="<?php echo $this->getCurrentCategoryId() ?>"/>
    <div class="amfinder-horizontal" id="<?php echo $finderId ?>Container">
        <div class="amfinder-title">
            <span><?php echo $finder->getName() ?></span>
        </div>
        <ul class="amfinder-toggle">
            <?php foreach ($finder->getDropdowns() as $dropdown): ?>
                <li>
                    <div class="dropdown-title"><?php echo $this->__($this->htmlEscape($dropdown->getName())) ?></div>
                    <div class="dropdown-element amshopby-clearer">
                        <select <?php echo $this->getDropdownAttributes($dropdown) ?>">
                        <?php foreach ($this->getDropdownValues($dropdown) as $v): ?>
                            <option value="<?php echo $v['value'] ?>"
                                <?php if ($v['selected']): ?>
                                    selected="selected"
                                <?php endif ?>>
                                <?php echo $this->htmlEscape($v['label']) ?>
                            </option>
                        <?php endforeach ?>
                        </select>
                    </div>
                </li>
            <?php endforeach ?>
            <li class="last">
                <div class="amfinder-buttons"
                     style="display:<?php echo($this->isButtonsVisible() ? 'block' : 'none') ?>">
                    <button class="button" title="<?php echo $this->__('Find') ?>" type="submit">
                        <span>
                            <span>
                                <?php echo $this->__('Find') ?>
                            </span>
                        </span>
                    </button>
                    <button class="button" name="reset" value="1" title="Reset"
                            type="submit">
                        <span>
                            <span>
                                <?php echo $this->__('Reset') ?>
                            </span>
                        </span>
                    </button>
                </div>
            </li>
        </ul>
    </div>
</form>
<script type="text/javascript">
    var <?php echo $finderId ?>  = new amFinder(
        '<?php echo $finderId ?>Container',
        '<?php echo $this->getAjaxUrl() ?>',
        '<?php echo $this->__('Loading...')?>',
        '<?php echo Mage::getStoreConfig('amfinder/general/partial_search')?>',
        <?php echo intval(Mage::getStoreConfig('amfinder/general/auto_submit')) ?>
    );
</script>

Спасибо вперед.

...