Webmastersite.net
Register Log In

Problem using information from checkbox

Comments on Problem using information from checkbox

mel
Member

Usergroup: Customer
Joined: Dec 16, 2006

Total Topics: 9
Total Comments: 29
mel
Posted Mar 10, 2007 - 9:11 AM:

Hi Paul,

Have set up a checkbox field called travel for the suggestlink.tpl, when setting the field up in admin have tried it with a value in and also without to see if that was the problem

On the details page I have tried this

<div class="details"><span class="labels"> <IF>{LINKCHECKED[LINKTRAVEL]}</IF>Travel: YES CAN TRAVEL</span>
</div>

And this

<IF {LINKCHECKED[LINKTRAVEL]}><div class="details"><span class="labels">Travel: YES CAN TRAVEL</span>
</div></IF>

What I am trying to do is if the checkbox has been checked on submission is to display something like this - Travel: Yes can travel - on the details.tpl

Clearly I am doing something wrong as I can get dropdown list selections to display without problem

What am I doing wrong?

Thanks Mel





mel
Member

Usergroup: Customer
Joined: Dec 16, 2006

Total Topics: 9
Total Comments: 29
mel
Posted Mar 12, 2007 - 5:16 PM:

Problem sorted,

Instead of putting <IF {LINKCHECKED}[LINKTRAVEL]> etc etc </IF>

I put <IF {LINKCHECKED}[travel]> etc etc </IF> and it worked ok

Paul - as you have probably guessed by now I have a very limited knowledge of PHP is the [ open closed brackets ] a function of PHP or something you have coded for WSN I know the {} is used in PHP - always keen to learn something new

Just begining to realize how useful the IF Else statements can be

Reckon it's about time I got myself a decent beginners book on PHP

Melsmiling face
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7867
Paul
Posted Mar 13, 2007 - 5:00 AM:

It's not PHP, it's just my syntax for passing things to template functions.

I know the {} is used in PHP

PHP's in-build templating mechanism uses {$variablename}, but that's actually just incidental.

WSN Links can tie into custom PHP functions with template functions though.
Search thread for
Download thread as
  • 0/5
  • 1
  • 2
  • 3
  • 4
  • 5



This thread is closed, so you cannot post a reply.