Why does the description field fail in contact form 7

:bullseye: What is your goal?

I have a contact form built with Contact Form 7, where the fields need to be sent to the CRM.

:thinking: What is the problem & what have you tried?

All the data is passed correctly except for the free-text field (text-area), which contains multiple lines.
I tried using escaping and also generating a JSON specifically for that field, but it still doesn’t work.

:clipboard: Error messages or input/output bundles

ConnectionError
Service is temporarily unavailable.
If I remove “description” from the Body JSON it’s work properly.

:camera_with_flash: Screenshots (scenario flow, module settings, errors)

I solved it by using the HTTP – Make a request module instead of the EspoCRM API Call, creating a structured payload file.
This is because the EspoCRM module has a poorly structured body and didn’t allow me to properly handle the description field. I tried everything, including replace and similar methods, to remove line breaks from the text string, but without success.

What you ran into is actually pretty common with multi-line text fields in Contact Form 7 when sending to a CRM via JSON. The problem is usually how the CRM module handles line breaks and payload structure.

In your case, the EspoCRM API module wasn’t formatting the JSON correctly for the description field, so any newlines or special characters would break it. Switching to HTTP – Make a request and building a proper JSON payload is the right approach — it lets you escape or encode multi-line text cleanly.

Essentially: structured payload + proper escaping = works every time for text areas with line breaks.

Thank you @Giulio_Rizzo for coming back to the Community to let us all know how you fixed the issue. Always very useful for other members to see the solution :slight_smile:

1 Like