Question

Where can i add some explanation text on a form which is not related to a field

  • 16 February 2023
  • 6 replies
  • 106 views

Userlevel 1
Badge +4

Hi

In this ticket form scenario the customer uploads a completed form. ( this form is easier done by attachment rather than replicating all the ticket fields). However I want to be able to add some explanation text that is not related to a particuilar ticket field (ie not like the customer tips feature). For example I owuld like to add a line of text that appears above the attachment option that says “please attach your completed xxxxxx form. The form can be found here (link to solutions article)”…

any suggestions?

 

 


6 replies

Userlevel 3
Badge +5

Hi @JCMLI1973,

 

If you’re on the Pro or Enterprise plan, you can go to Admin->Portals->Customize->Edit theme->Pages->Stylesheet->CSS and add the following code to display the text above the “Attachment” option.

.attachments-container::before{
content: "Please attach your completed xxxxxx form";
color: red;
}

 

 

Regards,

Sona 

Freshdesk, Freshchat, Freshcaller product expert

Are you interested in learning more about how our services can help add value to your business? Check out our Professional Services to know more & get started.

Userlevel 1
Badge +4

Thank you Sona! I presume that would then apply to all ticket forms in our system or could this be done for specific forms only?

Userlevel 3
Badge +5

Hi @JCMLI1973,

 

The code is specific to the portal where it is applied. Therefore, if you have mapped multiple ticket forms to the same portal where you’ve added this code, then the text would be displayed for all the forms associated with the portal. 

Badge +1

Yes, I would like this feature where you can add sentence or paragraph, or even image to the page to provide extra context or description of what you would like the requester to do or provide. 

I tried a simple single line text field, but that remains a input field and would be then submitted as a ticket field which would be unwanted. 

The support reply above saying that you can change the site layout to include text is not wanted since that appears then on every ticket form. 

We need something which understands what ticket form is currently selected.  

Badge +1

Yes, I would like this feature where you can add sentence or paragraph, or even image to the page to provide extra context or description of what you would like the requester to do or provide. 

I tried a simple single line text field, but that remains a input field and would be then submitted as a ticket field which would be unwanted. 

The support reply above saying that you can change the site layout to include text is not wanted since that appears then on every ticket form. 

We need something which understands what ticket form is currently selected.  

 

I had hoped that the form description which is editable may appear on the form page and therefore gave an option of text per form, but it doesn’t appear by the look. 

Though I will try to see if I can use JQuery to dynamically pull this in

Badge +1

I have actually achieved what I wanted and likely to be what others wanted too. 

Use jQuery and you can go to Admin->Portals->Customize->Edit theme->Pages->Tickets->Submit Tickets 

Then add code like this just before this bit 

{% snippet new_ticket_form %}

I added  so you can see I was looking for the ticket_form to be the submit poster form and if matched I wrote a comment just for that ticket form. 
 

<script>

jQuery(document).ready(function() {

    // Function to get query parameters from the URL

    function getQueryParam(parameterName) {

        var urlParams = new URLSearchParams(window.location.search);

        return urlParams.get(parameterName);

    }

    // Get the value of the "param1" query parameter

    var param1Value = getQueryParam('ticket_form');

    // Check if the parameter is present and not null

    if (param1Value !== null) {

        // Create HTML content based on the query parameter value

      

      if (param1Value == 'submit_poster') {

      

        var htmlContent = '<div class="custom-content">Attach your poster by pressing on the button below, the maximum file size is 20Mb and please only submit PDFs.</div>';

        // Insert the HTML content before the container with the specified ID

        jQuery('.attachments-container').before(htmlContent);

        

      }

    }

});

</script>


Result looks like this image. 

 

Reply