Keyword

Radio buttons and images

  • Anders Sällstedt
  • Anders Sällstedt's Avatar Topic Author
  • Offline
  • New Member
More
11 years 6 months ago #111286 by Anders Sällstedt
Radio buttons and images was created by Anders Sällstedt
Hi there,
I need to set up an extra field for a client that uses two radiobuttons to choose between two images. In this case they should be able to choose between two different icons. One showing an mountainbike and one a citybike.

How do I do it? I guess that I have to do something within the template with an if X = Y then img=bicycle.jpg.
Any pointers?

Cheers,
Anders

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
11 years 6 months ago #111287 by Krikor Boghossian
Replied by Krikor Boghossian on topic Re: Radio buttons and images
Hello Anders,

Since version 2.6.2 you can directly output individual extra fields in your K2 overrides.

Have a look at this blog post

Then you have to create a simple an if else statement on the item.php

Regards

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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

  • Anders Sällstedt
  • Anders Sällstedt's Avatar Topic Author
  • Offline
  • New Member
More
11 years 5 months ago #111288 by Anders Sällstedt
Replied by Anders Sällstedt on topic Re: Radio buttons and images
Sry for the late answer. Thank you for the info, it really helped a lot. Now I only have to figure out how to do the if-statement. Any ideas? I´m a real noob when it comes to php. :(

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
11 years 5 months ago #111289 by Krikor Boghossian
Replied by Krikor Boghossian on topic Re: Radio buttons and images
Look at this thread

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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

  • Anders Sällstedt
  • Anders Sällstedt's Avatar Topic Author
  • Offline
  • New Member
More
11 years 5 months ago #111290 by Anders Sällstedt
Replied by Anders Sällstedt on topic Re: Radio buttons and images
Thank you very much. The problem is that I don´t want to show it if it´s empty or if a radiobutton is set to off. :( Any ideás?

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


Powered by Kunena Forum