如何在prestashop中的联系表单上禁用“主题”标题​​下拉列表

时间:2014-12-04 09:35:41

标签: php prestashop

如何在联系表单上禁用“主题”标题​​下拉列表。我不需要网站管理员或客户服务这两个选项。

1 个答案:

答案 0 :(得分:4)

您可以在PrestaShop back-office - >中修改联系人Customers - > Contacts

要停用Subject下拉菜单,请在contact-form.tpl中填写此内容:

<div class="form-group selector1">
    <label for="id_contact">{l s='Subject Heading'}</label>
    {if isset($customerThread.id_contact)}
            {foreach from=$contacts item=contact}
                {if $contact.id_contact == $customerThread.id_contact}
                    <input type="text" class="form-control" id="contact_name" name="contact_name" value="{$contact.name|escape:'html':'UTF-8'}" readonly="readonly" />
                    <input type="hidden" name="id_contact" value="{$contact.id_contact}" />
                {/if}
            {/foreach}
</div>
    {else}
        <select id="id_contact" class="form-control" name="id_contact">
            <option value="0">{l s='-- Choose --'}</option>
            {foreach from=$contacts item=contact}
                <option value="{$contact.id_contact|intval}" {if isset($smarty.request.id_contact) && $smarty.request.id_contact == $contact.id_contact}selected="selected"{/if}>{$contact.name|escape:'html':'UTF-8'}</option>
            {/foreach}
        </select>
</div> <!-- .col-xs-12 .col-md-3 -->
    <p id="desc_contact0" class="desc_contact">&nbsp;</p>
    {foreach from=$contacts item=contact}
        <p id="desc_contact{$contact.id_contact|intval}" class="desc_contact contact-title" style="display:none;">
            <i class="icon-comment-alt"></i>{$contact.description|escape:'html':'UTF-8'}
        </p>
    {/foreach}
{/if}

隐藏字段包含联系人ID的值:

<input type="hidden" name="id_contact" value="YOUR_CONTACT_ID" />