How can I disable the subject and description fields from the request form?

Return to top

187 Comments

  • David Jetter

    Ifra Saqlain Looks like it still has the attachment field showing.

    0
  • Ifra Saqlain
    Community Moderator
    Most Engaged Community Member - 2022
    Most Engaged Community Member of The Year - 2021

    @David Jetter, 

    Currently in your code, remove it:

    document.querySelector('.form-field.string.optional.request_subject).style.display= "none";
    'none';

     

    Replace that line of code with given below:

    document.querySelector('.form-field.string.request_subject').style.display= "none";
    'none';
    0
  • David Jetter

    Ifra Saqlain That did the trick, thank you so much for helping with this!

    0
  • Brett Bowser
    Zendesk Community Manager
    Thanks for jumping in to help with this one Ifra! Glad you were able to ge this working on your end David :)  
    0
  • Ifra Saqlain
    Community Moderator
    Most Engaged Community Member - 2022
    Most Engaged Community Member of The Year - 2021

    My pleasure Brett Sir! and I'm glad that it's working for David :)

    0
  • Teresa

    Ifra Saqlain Shifting thought, do you know how to add fields to the subject without the subject being hidden? Looking to have the end user add the subject themselves, and then after clicking submit adding two dropdown custom fields to the subject line. I currently have: 

     

    But this doesn't work. Link to page is here. The two custom fields in question are dropdowns. Thanks in advance for any help you can offer!

    0
  • Ifra Saqlain
    Community Moderator
    Most Engaged Community Member - 2022
    Most Engaged Community Member of The Year - 2021

    @Teresa, try this code, add it to your script file --

     if($("#request_issue_type_select").val()=="360003074611") {
    $('#request_subject').keyup(function(event) { 
        function clickB() {
           var a = $("#request_custom_fields_1900000313287").val();
           var b = $("#request_custom_fields_360046758831").val();
           var c = $("#request_subject").val();
          $("#request_subject").click(function(e){
            e.preventDefault();
            $("#request_subject").val( a + " " + b + " " + c);
          })
        }
        clickB();
      });
      }


    Note: Add your IDs of the form and fields.

     

    i). When you have done with the code.

    ii) Go to that form page > select value in the both dropdowns.

    iii) Go to the subject field and type your title.

    iv) Double-click on the subject field after writing the title.

    v) Both dropdown field values will be added in the subject field.

     

    Hope it helps you.

    If any queries feel free to ask :) 

    0

Please sign in to leave a comment.

Powered by Zendesk