Display a custom Description based on the ticket field value

Answered

3 Comments

  • Trapta
    Community Moderator

    Hi @Vu Phan,

    It should be -

    if('#request_custom_fields_24239536' == 'No') {
    $('.request_custom_fields_24239536 p').html('This is a custom message.');
    }

    instead of 

    if('#request_custom_fields_24239536' == 'No') $('.request_custom_fields_24239536 p').html('<p>This is a custom message.</p>');

    Cheers,

    Team Diziana

    0
  • Amie B

    Hey Trapta,

    I've been playing around with your code to try and get my own version to work but no luck. 

    I'm just looking for somehting simple here. 

    If request_custom_fields_360026391973 is present on the form, then display this text below. and I want to be able to format the text. I have some formatting set up in a class on the css page for it.

    Any ideas on some example code which might be able to do this for me?

    Best,

    Amie

    0
  • Trapta
    Community Moderator

    Hi Amie B,

    Apologies for the delays in getting back to you on this. You can try below code to accomplish something like this:

    var fieldLen = $('.request_custom_fields_360026391973').length;

    if (fieldLen) {
    $('.request_custom_fields_360026391973 p').addClass('YOUR_CLASS_NAME').html('This is a custom message.');
    }

    Replace 'YOUR_CLASS_NAME' with the name of the custom class you have set up for formatting.

    Let me know if this solves your issue.

    Thanks

    Team Diziana

    0

Please sign in to leave a comment.

Powered by Zendesk