How to convert HTML tags in frontend

  • mdourou
  • Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
  • Posts: 76
  • Thank you received: 1

mdourou created the topic: How to convert HTML tags in frontend

Hi,

I have a form in BreezingForms and displays the record in Content Builder views. The problem is the text has html tags. How do I display the text without diplaying the html tags but applying the tags in frontend. if it's BOLD then the text will be bold.

Here is the link in frontend dev2.muslimlink.ca/classifieds/location/...ation?layout=listone
#226846
Attachments:
  • Posts: 2103
  • Karma: 65
  • Thank you received: 254

DarkoCujic replied the topic: How to convert HTML tags in frontend

Hey,

here's a cute little solution. In your view, set Edit by type to off. A new "link" should appear in the editable column (check screenshot). It should say Text for you, so click it, change to Textarea, scroll to the bottom of the popup window and you'll see Post filter option. Set it to allow HTML.


You can switch Edit by type back to on if you want to and that should be it. Let me know if it's working now.

Kind regards,
Darko

Satisfied with our support? PayPal tips
===========
Need to renew Pro Support? Buy Here!
===========
Satisfied? Consider a membership!
===========
Like us on Facebook
===========
Support Crosstec and get ALL EXTENSIONS and professional support for just $5. Here!
#226877
Attachments:
The following user(s) said Thank You: mdourou
  • Posts: 1437
  • Karma: 48
  • Thank you received: 188

mihaela replied the topic: How to convert HTML tags in frontend

Hello,

Please go to ContentBuilder view created for that form. Go to the View tab and in the Item wrap code for that Extra Details 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:
echo'
<script>

jQuery(document).ready(function(){
  jQuery(".cat-list-row0 br").remove();
});

</script>
';

$items["fieldname"]["value"] = html_entity_decode($items["fieldname"]["value"]);
NOTE: In the code above replace both instances of fieldname with the Name of that field for Extra Details.

Let me know if this works how you wanted.
If you have more questions, feel free to ask.

Regards,

Mihaela
#226878
  • mdourou
  • Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
  • Posts: 76
  • Thank you received: 1

mdourou replied the topic: How to convert HTML tags in frontend

Hi Darko,

Your solution works perfectly. Thanks a lot. Thumbs up!
#226888
Attachments:
  • mdourou
  • Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
  • Posts: 76
  • Thank you received: 1

mdourou replied the topic: How to convert HTML tags in frontend

Hi Mihaela,

I really appreciate your help but I think the solution given by Darko is quite simple and it did the job. Anyways thanks for this. maybe I should give a try some other time. Once again thank you! Thumbs up!
#226889
  • Posts: 1437
  • Karma: 48
  • Thank you received: 188

mihaela replied the topic: How to convert HTML tags in frontend

Hello,

Sorry for the double-reply. Somehow I didn't see that he had already answered when I was replying.

I'm glad that his solution works for you. :)

Best regards,

Mihaela
#226892
The following user(s) said Thank You: mdourou
Moderators: ForumSupporttomeperica
Time to create page: 0.298 seconds

New Support System

Dear Customers,

Users with active subscription have support priority which will be dona via ServiceDesk (My Account > Raise a ticket).
FREE Support topics will be answered when AND if there is time.

You can check support guidelines here : here

Regards,
Crosstec 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

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€

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!

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