TOPIC:

Displaying an image in the drop-down list. 1 month 3 weeks ago #251053

  • tihana.krivic's Avatar
  • tihana.krivic
  • Offline
  • Moderator
  • Moderator
  • Posts: 3007
  • Karma: 3
  • Thanks: 257
Hi,

you can't use CBImageScale, this is plugin for file upload in content builder.

But if you are using integration of BF and CB, you can add this image in content template (when someone click on details of record, this image can be shown, with little php code). If this is ok for you, I can help you with the code in content template

Regards,
Tihana

Please Log in or Create an account to join the conversation.

Displaying an image in the drop-down list. 1 month 3 weeks ago #251057

  • baramoonda's Avatar Topic Author
  • baramoonda
  • Offline
  • Fresh Breezer
  • Fresh Breezer
  • Posts: 18
  • Thanks: 1
Yes, I use integration of BF and CB :)
I will be glad if you can help with the code.

Please Log in or Create an account to join the conversation.

Displaying an image in the drop-down list. 1 month 3 weeks ago #251059

  • tihana.krivic's Avatar
  • tihana.krivic
  • Offline
  • Moderator
  • Moderator
  • Posts: 3007
  • Karma: 3
  • Thanks: 257
Hi,

in CB->Views->Content Prepare add this:
if ($items["lists"]["value"] =='value1') {
 $items["lists"]["value"] = '<img id="myimage" src="https://image.shutterstock.com/image-photo/butterfly-morpho-didius-260nw-600974249.jpg" alt="Butterfly" width="100" height="100" border="0" />';
}
//and so on for every value
Please replace lists with name of your select from list (not title), and value1 with value of your select from list, and link of image with image which you want to show.


This is how it looks like for me.
When I open this view:

and when I click on value1 it shows details and image:


If you need more help, let me know

Regards,
Tihana
Attachments:

Please Log in or Create an account to join the conversation.

Last edit: Post by tihana.krivic.

Displaying an image in the drop-down list. 1 month 3 weeks ago #251067

  • baramoonda's Avatar Topic Author
  • baramoonda
  • Offline
  • Fresh Breezer
  • Fresh Breezer
  • Posts: 18
  • Thanks: 1
Super, thank you very much!
The last question: can we replace the inscription "value 1" in the sheet with its name or picture, which we store under this value?
Sorry for my English))

Please Log in or Create an account to join the conversation.

Displaying an image in the drop-down list. 1 month 3 weeks ago #251068

  • baramoonda's Avatar Topic Author
  • baramoonda
  • Offline
  • Fresh Breezer
  • Fresh Breezer
  • Posts: 18
  • Thanks: 1
maybe here?

Please Log in or Create an account to join the conversation.

Displaying an image in the drop-down list. 1 month 3 weeks ago #251071

  • tihana.krivic's Avatar
  • tihana.krivic
  • Offline
  • Moderator
  • Moderator
  • Posts: 3007
  • Karma: 3
  • Thanks: 257
Hi,

in item wrap code of select list add:
<?php if($value == 'value1'){$value = '<img id="myimage" src="https://image.shutterstock.com/image-photo/butterfly-morpho-didius-260nw-600974249.jpg" alt="Butterfly" width="100" height="100" border="0" />';}  ?>


Regards,
Tihana
Attachments:

Please Log in or Create an account to join the conversation.

Last edit: Post by tihana.krivic.
Moderators: ForumSupport
Time to create page: 0.095 seconds

BreezingForms Pro 1.4.7 for WordPress Released!

Available in the membership section.

September Discount!

Massive discounts on all subscriptions!

Get Your Subscription Here

Quick Links

Downloads

BreezingForms

ContentBuilder

BreezingCommerce

Templates

Documentation

BreezingForms

ContentBuilder

BreezingCommerce

Apprendre BreezingForms (French Community)

Apprendre et maîtriser BreezingForms par des tutoriels et exemples, le tout en français

breezingforms.eddy-vh.com

Questions et réponses sur les forums de l'AFUJ

AFUJ

Special Offer

Summer Sale! All subscriptions at a special price!

Includes prio support, all of our current and future Joomla!® extensions and Joomla!® templates for the duration of your membership.

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!