I'm working on a Web-to-lead form from a PHP website into the Lead Object. The idea is we have a catchall field that is populated with miscellaneous data from the website that the Salesman may or may not need (we will be having workshop sessions in the future to determine this).

The field in Salesforce is a textarea field. The field on the website is simply a hidden input I parse data into as a string.

My question is, is it possible / how can I format the data we're sending in to the field so that

*Options - Bang & Olufsen 3D Advanced Sound System,Digital TV reception *Vehicletype - Car *ContractType - Personal *Initialpayments - 12

Is displayed in the format below to the Salesman

* Options - Bang & Olufsen 3D Advanced Sound System, Digital TV reception * Vehicletype - Car * ContractType - Personal * Initialpayments - 12

My initial thoughts were to just insert plain html breaks - but using a rich text field is currently not an option.

Any thoughts / feedback is appreciated thanks all


This is more of a web development question but anyway, you can't use HTML tags within a textarea, so why not creating your own textarea element that supports it?

<div class="textareanew">
      * Options -  Bang & Olufsen 3D Advanced Sound System
      * Vehicletype - Car 

    this.contentEditable = true;

div.textareanew {
    width: 300px;
    height: 150px;
    margin: 5px;
    border: 2px solid #ccc;

You can see an example in this JSfiddle

  • I may have wrongly worded the question, there are multiple arrays that I'll be parsing into a string, store them into a hidden input as part of the Web-to-lead form that works, I want to make the 'unclean' data prettier in the text field within the Lead Object page layout – David Picksley Apr 14 '19 at 16:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.