最近の検索
最近の検索はありません
How Can I Add Specific Text in new_request_page.hbs template based on Ticket Form ID?
回答済み
投稿日時:2021年8月06日
Hi,
I'm working on adding a new contact form to our help center and routing end users to specific ticket form based on where they clicked the submit a request link (thanks to help from Ifra Saqlain & the community!!).
Now, I am hoping I can customize text above the request form based on the ticket form id (today we have one from with text above it without special logic). What I want now is:
- Have Ticket Form A show Text A above the form
- Have Ticket Form B to show Text B above the form
- Have Text C follow both Text A and Text B above the form.
I've tried the code below but it's not working. Text A appears on both forms, and, it appears UNDER B. Does anyone know how to do this/what's up with my code?
{{#each ticket_forms}}
{{#is id 123}}
<p>Text A</p>
{{else}}
<p>Text B</p>
{{/is}}
{{/each}}
<p>Text C</p>
<br>
<div class="new-request-form">
{{request_form}}
</div>
1
18
18件のコメント
Zach
Hi, again, 1263169183150 :)
I'm curious if you have any suggestions for accomplishing this but instead of under the title of a form, I want the text to appear underneath a custom field, and ONLY when a specific drop-down value for that field is selected..?
Utilizing a custom field description would suffice but ultimately, I'd like this text to pop out the customer, more like a disclaimer, than a description.
0
Ifra Saqlain
Zach, In this case, you don't need to add JS code, you already have a textbox in your setting panel to edit the text.
Go to your settings panel and find the textbox of New Request Tip Text to edit the text.
0
Zach
Thank you so much, Ifra Saqlain.
Would it be possible to do something similar with this new_request_tip_text element?
This "tip" object was provided in a custom theme. I tried messing around with
$(“.new-request-tip”).text(‘TEST TEST TEST’)
but this didn't seem to work out well. The text itself never populated and the ticket form title was disappearing for some reason.
0
Ifra Saqlain
That code is only for the one web form when you add form-id into the script code.
You can change the structure of HTML like the given below.
script code would be:
Add a <h2> tag like this:
0
Zach
Sorry, Ifra Saqlain -- I should have been clearer. I'm not looking for this in the Title but as a blurb beneath it. Here's a screenshot:

0
Ifra Saqlain
Hi Zach,
1). Add the jQuery CDN on document_head.hbs file.
2). Add the script code at the bottom of your script.js file.
3). The title which would be added on new_request_page.hbs
If any confusion feel free t0 ask :)
Thanks
0
Zach
Ifra Saqlain - I'm trying to simply add a snippet of text below the title but I only want it on a single form. Any chance you could assist :) ????
0
Ifra Saqlain
:)
0
Swapnali Padale
Thanks Ifra Saqlain.
0
Ifra Saqlain
@Swapnali Bhadale, it is possible but How many blocks will you add I mean setting the panel has a limit if you have 6 or, 8 or, 12 you can but if you have a list in every col then you should write code to the hbs file instead of the manifest file.
I can guide you to add settings to the panel but first tell me, how many items are in each column and how many settings exist in your setting panel currently?
0
サインインしてコメントを残します。