Change the subject line to be equal to a value in a custom field

9 Kommentare

  • Simon Celen
    Community Moderator

    Hi Anton,

    Could you provide a link to your Help Center so I can take a closer look? Thank you

    0
  • Anton Van der meyden

    Hi Simon,

    See link below to the Help Center:

    https://kigomarketplace-eu.zendesk.com/hc/en-us

    I appreciate your help with this.

     

    Thank you.

    Anton

     

    0
  • Simon Celen
    Community Moderator

    Hi Anton,

    Here is the updated script that should do it:

    <script>

    $(document).ready(function() {

      var issuePickerTicketFieldID = 360026775373;
    var ticketFormID = location.search.split('ticket_form_id=')[1];
    var ticketFormTitle = $('select#request_issue_type_select > option:selected').text();

    if (ticketFormID == 360001758153) {
    $('.form-field.request_subject').hide(); // hide subject
    $('#request_subject').val(ticketFormTitle);
    $('#request_custom_fields_' + issuePickerTicketFieldID).on('change', function() {
    var issue = $(this).next('a.nesty-input').text();
    $('#request_subject').val(ticketFormTitle + ': ' + issue);
    });
    }

    });

    </script>

     

    Hope that helps.

     

    Simon

    0
  • Anton Van der meyden

    Hello Simon,

    Thank you for coming back to me so quick.

    This works and  I can play around with this to customize other forms.

    Thanks for your help and have a good weekend.

    Anton

     

    0
  • Anton Van der meyden

    Hello Simon,

    I hope you had a good weekend.

    I have another question that I hope you can help me with.

    On my custom form that I have created say for example a customer fills out five fields from the ten fields on the form.This would mean five fields are empty on the form when the ticket is submitted. Is it possible to hide these fields when the ticket is created so that it only shows the field with text in in them.

    Thank you in advance.

    Kind Regards,

    Anton

     

     

     

     

    0
  • Simon Celen
    Community Moderator

    Hi Anton,

    Do you mean to hide empty fields on the individual request page sidebar?

    0
  • Anton Van der meyden

    Hi Simon,

    Thanks for coming back to me.

    You are correct. See example below. This is from a ticket submitted from the Help Center.You can see their is fields that have no value. Is it possible to hide these fields as their value is blank?

    This is go go with the code you provide already. 

    Thank you for you assistance with this.

     

    Kind Regards,

    Anton

    0
  • Simon Celen
    Community Moderator

    Hi Anton,

    I don't think it's possible to only hide empty Ticket Fields on Zendesk Support. It should be possible with a Zendesk App but I'm not sure if one exists. If it doesn't then you could always get a developer to create it for you.

    0
  • Anton Van der meyden

    Hi Simon,

    I did not think this was possible.

    I was hoping to be able to do it without a developer.

    Thank you for your reply and have a good day.

    Kind Regards,

    Anton

     

    0

Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.

Powered by Zendesk