Mona's Avatar

Mona

가입한 날짜: 2021년 10월 16일

·

마지막 활동: 2021년 10월 16일

팔로잉

0

팔로워

0

총 활동 수

3

투표 수

0

가입 플랜

1

활동 개요

님의 최근 활동 Mona

Mona님이 에 댓글을 입력함

댓글How to customize the theme of the help center

Hi Ifra, thanks for the speedy response!

I've been continuing trying different things yesterday and I think I found the issue already. At least I wasn't able to reproduce the bug anymore.

The jQuery version that was loaded in our document_head.hbs was 3.5.1, I changed it to the version recommended in one of the articles here (https://code.jquery.com/jquery-3.6.0.min.js) and the issue didn't happen since.

Hope this might help anyone who comes across this issue as well!

댓글 보기 · 2021년 8월 06일에 게시됨 · Mona

0

팔로워

0

투표 수

0

댓글


Mona님이 에 댓글을 입력함

댓글How to customize the theme of the help center

Hello everyone!

I've managed to hide the subject line and description with the code suggested in this article:

var formId = $("#request_issue_type_select").val();

if (formId === '12345') {
$('.form-field.request_subject').hide(); // Hide subject
$('.form-field.request_description').hide(); // Hide description
$('#request_subject').val('test'); // autofill subject
$('#request_description').val('test'); // autofill description
}

However the page doesn't always seem to load correctly. Sometimes the fields disappear, sometimes they do not and only disappear when you reload the page. I'm guessing the script is not being loaded correctly, but I have no idea why or how to fix it.

I tried using document.addEventListener('DOMContentLoaded', function() {}) and
$(document).ready(function() {}), as both of them have been suggested in the comments of this article. I get the same results for both. It's also the same across Chrome, Firefox and Microsoft Edge.

Hope someone can help!

댓글 보기 · 2021년 8월 05일에 게시됨 · Mona

0

팔로워

2

투표 수

0

댓글