Gossamer Forum
Home : Products : Gossamer Links : Discussions :

image/icon with each checkbox result display?

Quote Reply
image/icon with each checkbox result display?
Could anyone please point me in the right direction for this?

How does one get an image (eg a small tick) displayed just before each checkbox result?

Example: on the submit form the link owner checks three of five options. At present these display ok as...

OptionA OptionC OptionD

but I would like...

xOptionA xOptionC xOptionD

where x is actually a small tick (.gif)

(I don't want the tick .gif to be displayed on the submit form.)

Thanks for any help.Angelic

Thanks,
--Jo

Last edited by:

iplay: Feb 18, 2004, 6:37 AM
Quote Reply
Re: [iplay] image/icon with each checkbox result display? In reply to
I'm not quite sure what you mean. Have you tried setting the field to CHECKBOX ?

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] image/icon with each checkbox result display? In reply to
Thanks Andy. There's no problem with the basic checkboxes. They are displaying correctly (and yes, the field is set to CHECKBOX). I'd simply like to achieve what you can see here (which is also running LSQL):
http://www.mysummercamps.com/...s/Detailed/5568.html

(halfway down in the right-hand column under Activities)

The results display shows:

General Sports Archery Baseball

(with a GIF tick in front of each option, but the options were originally submitted from the submit form with no GIF ticks in front of them...I presume)

If I simply plant a GIF into the link.html template, it will appear only once - how do you get it to appear against EACH option? Unsure

Sorry if this wasn't clear. Hope it's better now. Thanks.

Thanks,
--Jo
Quote Reply
Re: [iplay] image/icon with each checkbox result display? In reply to
You need a new global. Something like this should work;

<%values_edit($FieldName)%>

Code:
sub {

my $img_url = q|<img src="http://www.domain.com/tick.gif"> |;

my @cut = split /\n/, $_[0];

my $back;
foreach (@cut) {
$back .= $img_url . "$_ ";
}

$back ? return $back : return 'No flags found...';

}

Untested, but it should work :)

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!

Last edited by:

Andy: Feb 18, 2004, 8:38 AM
Quote Reply
Re: [Andy] image/icon with each checkbox result display? In reply to
Worked like a dream! First time!

A million thanks!

Thanks,
--Jo