在2张Zendesk票证表格之一中显示特定的文本块

问题描述 投票:0回答:1

我正在尝试在Zendesk中的2种票证形式中的一种上显示特定的文本块。

票证形式1-没有可见的特殊文字票证表格2-仅在选中此表格后才显示特殊文本

我必须要在new_requests_page的div中设置文本。当我发短信时,这两种票证上的文字都是可见的。

我希望有人可以为我提供所需的javascript代码,以使我的文本显示在特定的票证表单上。

ticket_form_id ='360001721394'

下面是我当前的页面代码。我的确有一些JavaScript,单击某个按钮时可以隐藏/显示文本。但是最重​​要的是,我真的希望实现这种特殊文本,使其仅在客户选择该表单时才能在特定表单上显示。


<div class="container-divider"></div>
<div class="container">
  <nav class="sub-nav">
    {{breadcrumbs}}
    {{search submit=false}}
  </nav>

  <h1>
    {{t 'submit_a_request'}}
    {{#if follow_up}}
      <span class="follow-up-hint">
        {{follow_up}}
      </span>
    {{/if}}
  </h1>

  <div class="form-disclaimer">
  <div class="btn-hide">
   <button id="hide">Hide/Show</button>

    </div>

<div class="disclaimer-title">
  <p>External Credit Reporting Bodies
  </div>
<div class="disclaimer-subtitle">
<p>Verify your identity with a credit reporting body</p>
  </div>

<p>Latitude is required by the Anti-Money Laundering &amp; Counter-Terrorism Financing Act 2006 to verify my identity before providing me with a product or service.<br>

By acknowledging this statement, I agree I have read this information and allow Latitude to provide personal information about me to credit reporting bodies to enable verification of my identity.<br><br>

Personal information that Latitude may provide to the credit reporting body includes:<br></p>

  <ul>
  <li>&bull; My full name</li>
    <li>&bull; My address</li>
    <li>&bull; My date of birth</li>
  </ul>


<p> I understand that in addition to the circumstances described in the privacy consent, my personal information will be used by the credit reporting body and by Latitude to assess whether the information provided by Latitude matches the information held about me by the credit reporting body for the purpose of verifying my identity. I also understand that use of my personal information in this way does not constitute a credit check or impact my credit standing in any way.<br><br>

The credit reporting body may inform Latitude as to whether the personal information provided is a full or partial match with information held by it. Latitude cannot rectify any discrepancies but will advise me by letter or email and provide contact details of the credit reporting body where I can confirm my details.<br><br>

Verification with a credit reporting body is the fastest way to establish your identity however, Latitude offers alternatives, for anyone not wishing to use their personal information held at a credit reporting body. We will attempt to verify you using alternative electronic verification means.<br><br> </p>
<div class="disclaimer-title">  
<p>Australian Government Document Verification Service</p>
  </div>
<div class="disclaimer-subtitle">
<p>Checking your identity with the Australian Government's Document Verification Service (DVS).</p>
  </div>
<p>The DVS is a national online system that allows organisations to compare an individual's identifying information with a government record.<br><br>

More information about the DVS is available on their website.<br><br>

By submitting your details on this page, you agree that:<br>
  <span>
    <ul>
      <li>&bull; You're authorised to provide the details; and</li>
            <li>&bull; You understand the details will be checked against records held by the Issuer or Official Record Holder.</li>
        </ul>
        </span>
  </p>
</div>


  <div class="form">
    {{request_form}}
  </div>
</div>

<script>
$(document).ready(function(){
  $("button").click(function(){
    $("p").toggle();
  $("ul").toggle();
  });
});
</script>

我对javascript和自学是陌生的。希望这里有人可以写出我需要的javascript代码才能使它正常工作?

我知道我想让JavaScript说什么,我只是不知道如何执行它。

如果票证表单= 360001721394比显示此div“免责声明”

预先感谢和问候,

Amie

javascript html zendesk
1个回答
0
投票

您可以获取当前页面的网址,并通过window.location.href.indexOf检查您的票证ID,如以下示例所示,然后显示您提到的div。看看是否有此帮助]

if (window.location.href.indexOf('ticket_form_id=360001721394') > -1) {
  $('.form-disclaimer').show();
}
© www.soinside.com 2019 - 2024. All rights reserved.