Bienvenido, Invitado
Recordarme

TEMA:

html fields showing html tags in frontend view 2 años 3 meses antes #236793

  • Autor del tema
  • witchypaws
  • Fuera de línea
  • Junior Breezer
  • Junior Breezer
  • Mensajes: 26
  • Gracias recibidas: 0
HI there

I have created a form in breezing forms and then created a special view in content creator

When I look at a listing on the frontend, all the fields that were html and had the editor enabled are showing the html tags

How do I stop that happening please, I am using the latest version of joomla and downloaded and installed the latest version of content creator about four days ago

I am using JCE editor (free) for the editor
Adjuntos:

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

html fields showing html tags in frontend view 2 años 3 meses antes #236824

  • mihaela
  • Fuera de línea
  • Developer
  • Developer
  • Mensajes: 3128
  • Karma: 105
  • Gracias recibidas: 415
Hello,

Here are instructions on how to get the pure text without HTML tags when displaying an HTML textarea record.

Please go to ContentBuilder view created for that form. Go to the View tab and in the Item wrap code for that textarea element paste in this code:
<?php $value=html_entity_decode($value); ?>

That will make the text display with HTML tags applied in the List view.

To make the text display that way also when you enter a certain record do as follows.
Go to Content Prepare and paste in this code:
$items["fieldname"]["value"] = html_entity_decode($items["fieldname"]["value"]);
NOTE: In the code above replace both instances of fieldname with the Name of that HTML textarea field.

Let me know if this works how you wanted.

Regards,

Mihaela

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

html fields showing html tags in frontend view 2 años 3 meses antes #236946

  • Autor del tema
  • witchypaws
  • Fuera de línea
  • Junior Breezer
  • Junior Breezer
  • Mensajes: 26
  • Gracias recibidas: 0
HI Mihaela

That did work however, the display now has an additional br tag under it each time, please see the screen shot, it makes the output look very unprofessional

Can you please tell me how to fix this

Thanks

Jacqui
Adjuntos:

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

html fields showing html tags in frontend view 2 años 3 meses antes #236959

  • mihaela
  • Fuera de línea
  • Developer
  • Developer
  • Mensajes: 3128
  • Karma: 105
  • Gracias recibidas: 415
Hello,

I've looked into this and it is true. When "html_entity_decode" is used it adds an additional <br> for each end of line.

At the moment, unforunately the only way to avoid the empty lines is not to use HTML textarea, but the regular one.

Regards,

Mihaela

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

html fields showing html tags in frontend view 2 años 3 meses antes #236967

  • Autor del tema
  • witchypaws
  • Fuera de línea
  • Junior Breezer
  • Junior Breezer
  • Mensajes: 26
  • Gracias recibidas: 0
There seems to be little point in using a cck if you can't have html fields without it looking unprofessional but thanks anyway

Will have to put the app in sobipro instead as it is vital to the display of our members

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

  • Página:
  • 1
Tiempo de carga de la página: 0.065 segundos