Bienvenido, Invitado
Recordarme

TEMA:

Line breaks in textarea ignored in admin and mailback emails 7 meses 1 semana antes #264878

  • Autor del tema
  • Gillian
  • Fuera de línea
  • Senior Breezer
  • Senior Breezer
  • Mensajes: 126
  • Karma: 2
  • Gracias recibidas: 0
I have a textarea in a form where the submitter is requested to enter dates and times as a list, each on a separate line.

This is displayed correctly when entering the form, but when received in the Mailback and Admin emails - which are set up to display in table cells, there are no line breaks, so it looks like this:

01/01/2022 09:00 - 17:00 01/02/2022 10:00 - 13:00 05/04/2022 11:00 - 14:00

instead of this:

01/01/2022 09:00 - 17:00
01/02/2022 10:00 - 13:00
05/04/2022 11:00 - 14:00

Is there a way to achieve this, other than dynamically adding rows, as that might not always be suitable.

TIA

Por favor, Identificarse o Crear cuenta para unirse a la conversación.

Line breaks in textarea ignored in admin and mailback emails 7 meses 1 semana antes #264882

  • Avatar de tihana.krivic
  • tihana.krivic
  • Fuera de línea
  • Moderator
  • Moderator
  • Mensajes: 10135
  • Karma: 3
  • Gracias recibidas: 682
Hi,

please go to your form->Advanced->More options->Scripts->Init.script->check Custom and put:
function ff_nameofform_init()
{
var test=ff_getElementByName('nameoftextarea').value;
var total=test  + '\r\n';
ff_getElementByName('nameoftextarea').value=total;
} // ff_nameofform_init
Please replace:
-nameofform with name of your form (not title)
-nameoftextarea with name of textarea (not title)

Let me know the result

Regards,
Tihana

Por favor, Identificarse o Crear cuenta para unirse a la conversación.

  • Página:
  • 1
Moderadores: ForumSupport
Tiempo de carga de la página: 0.048 segundos