WebmasterSite.net: PHP scripts to enable your creativity
WSN Links PHP Directory Software
PHP Scripts Webmaster Links Support Forums

Register | Forgot Password

Problem using information from checkbox

Version:
printPrint


Problem using information from checkbox
mel
Member

Usergroup: Customer
Joined: Dec 16, 2006
Total Topics: 10
Total Posts: 29
Posted 03/10/07 - 09:11 AM:
quote post
#1
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







Edited by mel on 03/10/07 - 05:09 PM
mel
Member

Usergroup: Customer
Joined: Dec 16, 2006
Total Topics: 10
Total Posts: 29
Posted 03/12/07 - 04:16 PM:
quote post
#2
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

Mel:)
Paul
Administrator
Avatar

Usergroup: Administrator
Joined: Dec 21, 2001
Location: Northern California
Total Topics: 57
Total Posts: 6316
Posted 03/13/07 - 04:00 AM:
quote post
#3
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.

"Do things you love doing, because then it ain't work. Don't do something you don't really enjoy, because you're never going to work hard enough at it." - Bob Young, founder of Red Hat
Search thread for
Download thread as


You don't have permission to post.

Please login or register.

   
 
© 2008 Paul Knierim. All rights reserved.