Can I get the customer's website request form data to retain whitespace? | Community
Skip to main content

Can I get the customer's website request form data to retain whitespace?

  • December 16, 2021
  • 3 replies
  • 0 views

When customers submit code using the web interface that includes whitespace, the whitespace is stripped by the time the request reaches our system, per normal html behavior.  Is there a way to work around this?

3 replies

  • December 17, 2021
Hi Lisa!
 
Thanks for posting your question to the Community. That is definitely bothersome especially if you have your customer's submitting code snippets. The best way to retain whitespace in the request html is by adding the <pre> element wrapped around the entire html body. This would preserve the original formatting of the request (including whitespace). However, the only way to edit the ticket field html as such is by building your own custom ticket form. If you're not currently using a custom ticket form, you can see how to get started with building one [here](https://developer.zendesk.com/documentation/ticketing/managing-tickets/building-a-custom-ticket-form-with-the-zendesk-api/). 
 
Hope this helps!
 
Best,
 
Erica - Dev Support

  • Author
  • December 24, 2021

We are using the Customer Portal, and were not planning to move the whole help desk to our regular website and integrate the two. 

Is there no way to add <pre> tags to the description field within Zendesk's Customer Portal?


  • December 28, 2021
Hi Lisa,
 
I just double checked it myself and unfortunately imbedding html/markdown directly through the Customer Portal or Admin Support Settings isn't supported. 
 
Sorry for any inconvenience!
 
Best,
 
Erica - Dev Support