 |

ethan76
User
Jun 3, 2008, 6:36 AM
Post #1 of 3
(161 views)
Shortcut
|
|
Image from pulldown menu
|
Can't Post
|
|
Hi, I'm just getting into CMS builder and can already say I think it's great! There's one thing I'd like to do and can't yet find a work-around though. I want to have the user select one of three options in a pull down menu, and then on the live page for this to appear as an image, rather than type. So, I have three options; Road Legal Off road Kid's Quads Can I alter the code on the page so that - depending on what's chosen - an image changes? Probably a real noob queston - any help very appreciated! Thanks, Ethan
|
|
|  |
 |

Dave
Staff
/ Moderator

Jun 3, 2008, 9:33 AM
Post #2 of 3
(108 views)
Shortcut
|
|
Re: [ethan76] Image from pulldown menu
[In reply to]
|
Can't Post
|
|
Ethan, welcome to the CMS Builder forum! :) The simplest way to do that would be with a PHP if statement like this:
<?php if ($record['yourField'] == "Road Legal"): ?> Show Image 1 <?php endif ?> <?php if ($record['yourField'] == "Off Road"): ?> Show Image 2 <?php endif ?> <?php if ($record['yourField'] == "Kid's Quads"): ?> Show Image 3 <?php endif ?> But use your own variable and fieldname instead of $record['yourField']. Give that a try and let me know if it does what you need. Dave Edis - Senior Developer interactivetools.com
|
|
|  |
 |

ethan76
User
Jun 3, 2008, 10:02 AM
Post #3 of 3
(104 views)
Shortcut
|
|
Re: [Dave] Image from pulldown menu
[In reply to]
|
Can't Post
|
|
Dave, That worked a treat! CMS builder is genius - it's cured a headache I've had for about 3 years... Thanks Ethan
|
|
|  |
|