- Posts: 16
COMMUNITY FORUM
Radio buttons and images
- Anders Sällstedt
-
Topic Author
- Offline
- New Member
Less
More
12 years 1 month 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
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
-
- Offline
- Platinum Member
Less
More
- Posts: 15920
12 years 1 month 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
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
Please Log in or Create an account to join the conversation.
- Anders Sällstedt
-
Topic Author
- Offline
- New Member
Less
More
- Posts: 16
12 years 1 month 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
-
- Offline
- Platinum Member
Less
More
- Posts: 15920
12 years 1 month ago #111289
by Krikor Boghossian
Replied by Krikor Boghossian on topic Re: Radio buttons and images
Look at this
thread
Please Log in or Create an account to join the conversation.
- Anders Sällstedt
-
Topic Author
- Offline
- New Member
Less
More
- Posts: 16
12 years 1 month 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.