最近の検索
最近の検索はありません

Marc
参加日2022年7月11日
·
前回のアクティビティ2025年2月11日
フォロー中
4
フォロワー
0
合計アクティビティ
151
投票
81
受信登録
68
アクティビティの概要
バッジ
記事
投稿
コミュニティへのコメント
記事へのコメント
アクティビティの概要
さんの最近のアクティビティ Marc
Marcさんがコメントを作成しました:
Hi Ifra,
Thank you for your response. I attempted to add the closing tags but unfortunately it did not resolve the issue. Upon added the missing the closing tags the hidden subject line appeared.
I tested a few things to isolate the issue and noticed that when using the variable bn with .text; I lose all formatting and the subject line only read "FORM Request".
$('#request_subject').val(rt.text + " - "+ cn.text + " - " + bn.text);
However, when using the variable cn twice (ref: below) the subject line read as expected "RT String - CN String - CN String"
$('#request_subject').val(rt.text + " - "+ cn.text + " - " + cn.text);
I'm wondering if since bn is not a drop-down menu selection but is instead a numerical value / regex field type, if that makes any difference.
Below is the reposted code including the beginning if statement.
if(location.href.indexOf("/hc/en-us/requests/new?ticket_form_id=360001541692") !=-1){
$('#request_subject').val("FORM Request");
var rt = document.querySelector('#new_request > div.form-field.string.required.request_custom_fields_5975694187661 > a');
var cn = document.querySelector('#new_request > div.form-field.string.required.request_custom_fields_360040294151 > a');
var bn = document.querySelector('#new_request > div.form-field.string.required.request_custom_fields_360017033972 > a');
var pt = rt.parentElement;
let reminder = document.createElement('reminder');
pt.appendChild(reminder);
let req = document.createElement('req');
$(".request_custom_fields_360040294151").change(function () {
var rt = document.querySelector('#new_request > div.form-field.string.required.request_custom_fields_5975694187661 > a');
var cn = document.querySelector('#new_request > div.form-field.string.required.request_custom_fields_360040294151 > a');
var bn = document.querySelector('#new_request > div.form-field.string.required.request_custom_fields_360017033972 > a');
$('#request_subject').val(rt.text + " - "+ cn.text + " - " + bn.text);
});
$(".request_custom_fields_5975694187661").change(function () {
var rt = document.querySelector('#new_request > div.form-field.string.required.request_custom_fields_5975694187661 > a');
var cn = document.querySelector('#new_request > div.form-field.string.required.request_custom_fields_360040294151 > a');
var bn = document.querySelector('#new_request > div.form-field.string.required.request_custom_fields_360017033972 > a');
$('#request_subject').val(rt.text + " - "+ cn.text + " - " + bn.text);
コメントを表示 · 投稿日時:2023年5月25日 · Marc
0
フォロワー
0
投票
0
コメント
Marcさんがコメントを作成しました:
Hi Ifra Saqlain
I was hoping you could assist with the below js script. We're encountering a situation where the subject line was prefixing the subject line variables. Once we added bn it removes everything. Note - bn is regex while rt is a drop down and CN is text.
$('#request_subject').val("FORM Request");
var rt = document.querySelector('#new_request > div.form-field.string.required.request_custom_fields_5975694187661 > a');
var cn = document.querySelector('#new_request > div.form-field.string.required.request_custom_fields_360040294151 > a');
var bn = document.querySelector('#new_request > div.form-field.string.required.request_custom_fields_360017033972 > a');
var pt = rt.parentElement;
let reminder = document.createElement('reminder');
pt.appendChild(reminder);
let req = document.createElement('req');
$(".request_custom_fields_360040294151").change(function () {
var rt = document.querySelector('#new_request > div.form-field.string.required.request_custom_fields_5975694187661 > a');
var cn = document.querySelector('#new_request > div.form-field.string.required.request_custom_fields_360040294151 > a');
var bn = document.querySelector('#new_request > div.form-field.string.required.request_custom_fields_360017033972 > a');
$('#request_subject').val(rt.text + " - "+ cn.text + " - "+ bn.text);
});
$(".request_custom_fields_5975694187661").change(function () {
var rt = document.querySelector('#new_request > div.form-field.string.required.request_custom_fields_5975694187661 > a');
var cn = document.querySelector('#new_request > div.form-field.string.required.request_custom_fields_360040294151 > a');
var bn = document.querySelector('#new_request > div.form-field.string.required.request_custom_fields_360017033972 > a');
$('#request_subject').val(rt.text + " - "+ cn.text + " - "+ bn.text);
コメントを表示 · 投稿日時:2023年5月19日 · Marc
0
フォロワー
1
投票
0
コメント