最近搜索


没有最近搜索

Strange Subject ID in the Help Center V4



已于 2024年8月23日 发布

Hi everyone,

 

I'm certain there is an easy solution, but I'm simply trying to auto fill the subject on the help center for a specific form selected.

Inspecting the field shows an id of:  #3--input.StyledTextInput-sc-k12n8x-0.egmjoO

 

An older version of the HC the subject id shows #request_subject.

 

This is probably why the form's subject is blank when I have this at the bottom of the script.js file. The date part is to confirm the code continues on the proper form.

 

  var now = new Date();
 
 var ticketForm = location.search.split('ticket_form_id=')[1];
 if(ticketForm == 28485134800795) {
   console.log('Datetime.'+now);
   $('label[for=request_subject]').html("Custom Label");
        $('#3--input').val('Custom subject'); // Autofill subject
    }
 

All feedback is greatly appreciated.

 


0

0

0 条评论

请先登录再写评论。

找不到所需的内容?

新建帖子