html fields showing html tags in frontend view

  • witchypaws
  • Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 25
  • Thank you received: 0

witchypaws created the topic: html fields showing html tags in frontend view

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
#236793
Attachments:
  • Posts: 2428
  • Karma: 85
  • Thank you received: 330

mihaela replied the topic: html fields showing html tags in frontend view

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
#236824
  • witchypaws
  • Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 25
  • Thank you received: 0

witchypaws replied the topic: html fields showing html tags in frontend view

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
#236946
Attachments:
  • Posts: 2428
  • Karma: 85
  • Thank you received: 330

mihaela replied the topic: html fields showing html tags in frontend view

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
#236959
  • witchypaws
  • Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 25
  • Thank you received: 0

witchypaws replied the topic: html fields showing html tags in frontend view

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
#236967
Moderators: tomeperica
Time to create page: 0.107 seconds

New Icon Packs Category!

Crosstec is now offering icon packs.

If you are a paying subscriber, icon packs are automatically added to your account.

Check out our icon packs page!

Live Support Chat Opened!

Join our Discord chat here to receive live support and talk directly to the team!

Summer Sale!

50% discount on all of our extension subscription plans, templates and icon packs!

Get Your Subscription Here

News and Updates

Get informed about new downloads, updates and more in our News and Updates newsletter.

All Extensions Subscription

Get 1 year access to all of our current and future products and 1 year of professional support -- 99 for just 49! (Summer Sale)

No support per domain or website installation limits! Includes all of our current and future Joomla!® extensions, Joomla!® templates for the duration of your membership. This means, by purchasing an All Extensions Subscription you'll have it all covered!

Get it from here

3rd Party Discount - 25% Off

We help you to keep your costs under control. If you are a new member and purchased a form building tool from a different form vendor, then you'll get a 25% discount on our subscription plans.

How to receive the discount:

Send us a quick email to sales@crosstec.org with a proof of purchase (for example a paypal receipt), await payment instructions and enjoy your membership!

Live Support Chat Opened!

Join our Discord chat here to receive live support and talk directly to the team!

Community Reward

Help us to create new extensions and plugins! With only $5 you help us a lot and get unlimited download access to all of our products, professional support and even more. Get your reward now!

Read More Here