如何在联系表单上禁用“主题”标题下拉列表。我不需要网站管理员或客户服务这两个选项。
答案 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"> </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" />